You are on page 1of 244

ADOBE AIR

http://help.adobe.com/zh_CN/legalnotices/index.html

2011/10/13

iii

1 : Adobe AIR
2 : Adobe AIR
Adobe AIR

.................................................................................................. 2

Adobe AIR

.................................................................................................. 3

AIR

Adobe AIR

........................................................................................ 4

.................................................................................................. 4

3 : AIR API
AIR ActionScript 3.0

................................................................................... 6

AIR Flash Player


AIR Flex

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4 : AIR Adobe Flash Platform


AIR SDK

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Flex SDK

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

SDK

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5 : AIR
Flash Builder Flex AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Flash Professional AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Flash Professional AIR for Android


iOS AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Dreamweaver HTML AIR


AIR SDK HTML AIR
Flex SDK AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Flex SDK AIR for Android

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

6 : AIR
AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

7 : AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

2011/10/13

ADOBE AIR

iv

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

AIR AIR
AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

8 : AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

AIR
TV AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

AIR
AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

9 : Adobe AIR

AIR (ANE)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

NativeProcess ActionScript
ActionScript SWC

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

ANE

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

10 : ActionScript
Flex SDK AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

AIR MXML ActionScript


AIR (Flex)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

11 : AIR Debug Launcher (ADL)

ADL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
ADL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
ADL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
12 : AIR Developer Tool (ADT)

ADT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
ADT

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

ADT

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

ADT

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

2011/10/13

ADOBE AIR

13 : AIR
AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

ADT AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

ADT AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

ADT

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

14 : AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

AIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
15 :

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

16 : AIR.SWF API
badge.swf

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

badge.swf AIR
air.swf

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

AIR
AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

17 : AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

18 :
Source Viewer

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

Source Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217


19 : AIR HTML
AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

AIR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

2011/10/13

ADOBE AIR

vi

20 : AIR
AIR
AIR HTML HTML

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

21 :
Bash shell Linux Mac OS
Windows

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

2011/10/13

1 : Adobe AIR
Adobe AIR Web Internet (RIA)
Adobe Flex Adobe Flash SWF ActionScript 3.0
AIR AIR HTML JavaScript Ajax HTML
Adobe AIR (http://www.adobe.com/cn/devnet/air/) Adobe AIR

AIR Flash Flex HTML

JavaScript Ajax

Flash/Flex/ActionScript
HTML/JavaScript/CSS/Ajax
AIR
AIR iOS AIR iOS AIR

AIR AIR

Web
Web

C C++
API
AIR API

AIR API AIR


SWF ActionScript API Flex ActionScript
HTML CSS JavaScript
Ajax
Adobe AIR ActionScript API API

AIR Flash
Flex HTML Ajax
AIR Adobe AIR
(http://www.adobe.com/go/learn_air_relnotes_cn)

2011/10/13

2 : Adobe AIR
Adobe AIR AIR

AIR
AIR
Adobe AIR Adobe
Adobe

AIR AIR AIR


Android Mac Windows iOS

AIR AIR SDKAdobe Flash Builder Adobe Flex SDK AIR SDK
AIR

Adobe AIR (http://www.adobe.com/cn/products/air/systemreqs/) AIR AIR

AIR AIR AIR

Adobe AIR

Windows

1 http://get.adobe.com/cn/air
2
3
Mac

1 http://get.adobe.com/cn/air
2
3
4 (Authenticate) Mac OS
Linux
Linux AIR 2.7 Linux AIR AIR 2.6 SDK

1 http://kb2.adobe.com/cps/853/cpsid_85304.html
2
chmod +x AdobeAIRInstaller.bin

Linux

2011/10/13

ADOBE AIR

Adobe AIR

3
4

Adobe AIR rpm rpm Debian deb


AIR

1 AIR http://kb2.adobe.com/cps/853/cpsid_85304.html
rpm Debian

2 AIR

a Debian
sudo dpkg -i <path to the package>/adobeair-2.0.0.xxxxx.deb

b rpm
sudo rpm -i <path to the package>/adobeair-2.0.0-xxxxx.i386.rpm

AIR 1.5.3
sudo rpm -U <path to the package>/adobeair-2.0.0-xxxxx.i386.rpm

AIR 2 AIR

Adobe AIR /opt/Adobe AIR/Versions/1.0


AIR mime application/vnd.adobe.air-application-installer-package+zip .air mime
AIR
Android
Android Market AIR
ADT -installRuntime AIR AIR

133 ADT installRuntime


iOS
AIR iPhone iTouch iPad

60 AIR for iOS

Adobe AIR

Windows

1 Windows >
2 Windows

2011/10/13

ADOBE AIR

Adobe AIR

3 Adobe AIR
4 /
Mac

Adobe AIR Uninstaller /Applications/Utilities


Linux

Adobe AIR Uninstaller


AIR -uninstall
AIR adobeair adobecerts
Android

1
2 > Adobe AIR
3
ADT -uninstallRuntime 134 ADT uninstallRuntime

AIR
AIR
AIR

1 AIR
2 Install Now
3 AIR
Windows Windows
Mac OS Applications

Macintosh HD/Users/JoeUser/Applications/
AIR

http://www.adobe.com/go/learn_air_relnotes_cn

Adobe AIR
Adobe Adobe AIRAdobe Adobe AIR

Adobe AIR Adobe AIR Adobe


Adobe AIR

2011/10/13

ADOBE AIR

Adobe AIR

AIR AIR

AIR SettingsManager http://airdownload.adobe.com/air/applica-

tions/SettingsManager/SettingsManager.air AIR SettingsManager


Adobe AIR http://airinstall.adobe.com
Adobe

Adobe

2011/10/13

3 : AIR API
Adobe AIR Adobe Flash Player SWF
ActionScript 3.0
Adobe AIR API
ActionScript 3.0
Adobe Flash Platform ActionScript 3.0

HTML
HTML AIR JavaScript API AIRAliases.js JavaScript
AIR API API
Adobe AIR HTML
HTML Adobe AIR API

AIR ActionScript 3.0


Adobe AIR Adobe Flash Player SWF

HTML
AIRAliases.js JavaScript HTML Adobe AIR API

ActionScript 3.0

AIR

ARecord

flash.net.dns

2.0

AAAARecord

flash.net.dns

2.0

ApplicationUpdater

air.update

1.5

ApplicationUpdaterUI

air.update

1.5

AudioPlaybackMode

flash.media

3.0

AutoCapitalize

flash.text

3.0

BrowserInvokeEvent

flash.events

1.0

CameraPosition

flash.media

3.0

CameraRoll

flash.media

2.0

CameraRollBrowseOptions

flash.media

3.0

CameraUI

flash.media

2.5

CertificateStatus

flash.security

2.0

CompressionAlgorithm

flash.utils

1.0

2011/10/13

ADOBE AIR

AIR API

ActionScript 3.0

AIR

DatagramSocket

flash.net

2.0

DatagramSocketDataEvent

flash.events

2.0

DNSResolver

flash.net.dns

2.0

DNSResolverEvent

flash.events

2.0

DockIcon

flash.desktop

1.0

DownloadErrorEvent

air.update.events

1.5

DRMAuthenticateEvent

flash.events

1.0

DRMDeviceGroup

flash.net.drm

3.0

DRMDeviceGroupErrorEvent

flash.net.drm

3.0

DRMDeviceGroupEvent

flash.net.drm

3.0

DRMManagerError

flash.errors

1.5

EncryptedLocalStore

flash.data

1.0

ExtensionContext

flash.external

2.5

File

flash.filesystem

1.0

FileListEvent

flash.events

1.0

FileMode

flash.filesystem

1.0

FileStream

flash.filesystem

1.0

FocusDirection

flash.display

1.0

GameInput

flash.ui

3.0

GameInputControl

flash.ui

3.0

GameInputControlType

flash.ui

3.0

GameInputDevice

flash.ui

3.0

GameInputEvent

flash.ui

3.0

GameInputFinger

flash.ui

3.0

GameInputHand

flash.ui

3.0

Geolocation

flash.sensors

2.0

GeolocationEvent

flash.events

2.0

HTMLHistoryItem

flash.html

1.0

HTMLHost

flash.html

1.0

HTMLLoader

flash.html

1.0

HTMLPDFCapability

flash.html

1.0

HTMLSWFCapabiltiy

flash.html

2.0

HTMLUncaughtScriptExceptionEvent

flash.events

1.0

HTMLWindowCreateOptions

flash.html

1.0

2011/10/13

ADOBE AIR

AIR API

ActionScript 3.0

AIR

Icon

flash.desktop

1.0

IFilePromise

flash.desktop

2.0

ImageDecodingPolicy

flash.system

2.6

InteractiveIcon

flash.desktop

1.0

InterfaceAddress

flash.net

2.0

InvokeEvent

flash.events

1.0

InvokeEventReason

flash.desktop

1.5.1

IPVersion

flash.net

2.0

IURIDereferencer

flash.security

1.0

LocationChangeEvent

flash.events

2.5

MediaEvent

flash.events

2.5

MediaPromise

flash.media

2.5

MediaType

flash.media

2.5

MXRecord

flash.net.dns

2.0

NativeApplication

flash.desktop

1.0

NativeDragActions

flash.desktop

1.0

NativeDragEvent

flash.events

1.0

NativeDragManager

flash.desktop

1.0

NativeDragOptions

flash.desktop

1.0

NativeMenu

flash.display

1.0

NativeMenuItem

flash.display

1.0

NativeProcess

flash.desktop

2.0

NativeProcessExitEvent

flash.events

2.0

NativeProcessStartupInfo

flash.desktop

2.0

NativeWindow

flash.display

1.0

NativeWindowBoundsEvent

flash.events

1.0

NativeWindowDisplayState

flash.display

1.0

NativeWindowDisplayStateEvent

flash.events

1.0

NativeWindowInitOptions

flash.display

1.0

NativeWindowRenderMode

flash.display

3.0

NativeWindowResize

flash.display

1.0

NativeWindowSystemChrome

flash.display

1.0

NativeWindowType

flash.display

1.0

NetworkInfo

flash.net

2.0

2011/10/13

ADOBE AIR

AIR API

ActionScript 3.0

AIR

NetworkInterface

flash.net

2.0

NotificationType

flash.desktop

1.0

OutputProgressEvent

flash.events

1.0

PaperSize

flash.printing

2.0

PrintMethod

flash.printing

2.0

PrintUIOptions

flash.printing

2.0

PTRRecord

flash.net.dns

2.0

ReferencesValidationSetting

flash.security

1.0

ResourceRecord

flash.net.dns

2.0

RevocationCheckSettings

flash.security

1.0

Screen

flash.display

1.0

ScreenMouseEvent

flash.events

1.0

SecureSocket

flash.net

2.0

SecureSocketMonitor

air.net

2.0

ServerSocket

flash.net

2.0

ServerSocketConnectEvent

flash.events

2.0

ServiceMonitor

air.net

1.0

SignatureStatus

flash.security

1.0

SignerTrustSettings

flash.security

1.0

SocketMonitor

air.net

1.0

SoftKeyboardType

flash.text

3.0

SQLCollationType

flash.data

1.0

SQLColumnNameStyle

flash.data

1.0

SQLColumnSchema

flash.data

1.0

SQLConnection

flash.data

1.0

SQLError

flash.errors

1.0

SQLErrorEvent

flash.events

1.0

SQLErrorOperation

flash.errors

1.0

SQLEvent

flash.events

1.0

SQLIndexSchema

flash.data

1.0

SQLMode

flash.data

1.0

SQLResult

flash.data

1.0

SQLSchema

flash.data

1.0

SQLSchemaResult

flash.data

1.0

2011/10/13

ADOBE AIR

10

AIR API

ActionScript 3.0

AIR

SQLStatement

flash.data

1.0

SQLTableSchema

flash.data

1.0

SQLTransactionLockType

flash.data

1.0

SQLTriggerSchema

flash.data

1.0

SQLUpdateEvent

flash.events

1.0

SQLViewSchema

flash.data

1.0

SRVRecord

flash.net.dns

2.0

StageAspectRatio

flash.display

2.0

StageOrientation

flash.display

2.0

StageOrientationEvent

flash.events

2.0

StageText

flash.text

3.0

StageTextInitOptions

flash.text

3.0

StageWebView

flash.media

2.5

StatusFileUpdateErrorEvent

air.update.events

1.5

StatusFileUpdateEvent

air.update.events

1.5

StatusUpdateErrorEvent

air.update.events

1.5

StatusUpdateEvent

air.update.events

1.5

StorageVolume

flash.filesystem

2.0

StorageVolumeChangeEvent

flash.events

2.0

StorageVolumeInfo

flash.filesystem

2.0

SystemIdleMode

flash.desktop

2.0

SystemTrayIcon

flash.desktop

1.0

TouchEventIntent

flash.events

3.0

UpdateEvent

air.update.events

1.5

Updater

flash.desktop

1.0

URLFilePromise

air.desktop

2.0

URLMonitor

air.net

1.0

URLRequestDefaults

flash.net

1.0

XMLSignatureValidator

flash.security

1.0

AIR Flash Player


SWF AIR

2011/10/13

ADOBE AIR

11

AIR API

AIR

flash.desktop

flash.display

Clipboard

supportsFilePromise

2.0

ClipboardFormats

BITMAP_FORMAT

1.0

FILE_LIST_FORMAT

1.0

FILE_PROMISE_LIST_FORMAT

2.0

URL_FORMAT

1.0

childSandboxBridge

1.0

parentSandboxBridge

1.0

assignFocus()

1.0

autoOrients

2.0

deviceOrientation

2.0

nativeWindow

1.0

orientation

2.0

orientationChange

2.0

orientationChanging

2.0

setAspectRatio

2.0

setOrientation

2.0

softKeyboardRect

2.6

supportedOrientations

2.6

supportsOrientationChange

2.0

owner

2.6

listOwnedWindows

2.6

LoaderInfo

Stage

NativeWindow

NativeWindowInitOptions owner

2011/10/13

2.6

ADOBE AIR

12

AIR API

AIR

flash.events

Event

HTTPStatusEvent

KeyboardEvent

CLOSING

1.0

DISPLAYING

1.0

PREPARING

2.6

EXITING

1.0

HTML_BOUNDS_CHANGE

1.0

HTML_DOM_INITIALIZE

1.0

HTML_RENDER

1.0

LOCATION_CHANGE

1.0

NETWORK_CHANGE

1.0

STANDARD_ERROR_CLOSE

2.0

STANDARD_INPUT_CLOSE

2.0

STANDARD_OUTPUT_CLOSE

2.0

USER_IDLE

1.0

USER_PRESENT

1.0

HTTP_RESPONSE_STATUS

1.0

responseHeaders

1.0

responseURL

1.0

commandKey

1.0

controlKey

1.0

2011/10/13

ADOBE AIR

13

AIR API

AIR

flash.net

FileReference

NetStream

URLRequest

URLStream

extension

1.0

httpResponseStatus

1.0

uploadUnencoded()

1.0

drmAuthenticate

1.0

onDRMContentData

1.5

preloadEmbeddedData()

1.5

resetDRMVouchers()

1.0

setDRMAuthenticationCredentials()

1.0

authenticate

1.0

cacheResponse

1.0

followRedirects

1.0

idleTimeout

2.0

manageCookies

1.0

useCache

1.0

userAgent

1.0

httpResponseStatus event

1.0

2011/10/13

ADOBE AIR

14

AIR API

AIR

flash.printing

PrintJob

active

2.0

copies

2.0

firstPage

2.0

isColor

2.0

jobName

2.0

lastPage

2.0

maxPixelsPerInch

2.0

paperArea

2.0

printableArea

2.0

printer

2.0

printers

2.0

selectPaperSize()

2.0

showPageSetupDialog()

2.0

start2()

2.0

supportsPageSetupDialog

2.0

terminate()

2.0

pixelsPerInch

2.0

printMethod

2.0

Capabilities

languages

1.1

LoaderContext

allowLoadBytesCodeExecution

1.0

Security

APPLICATION

1.0

KeyLocation

D_PAD

2.5

PrintJobOptions

flash.system

flash.ui

AIR URLRequest

ByteArray.compress() ByteArray.uncompress() algorithm deflate zlib


AIR

AIR Flex
Adobe AIR Adobe Flex MX

FileEvent
FileSystemComboBox
FileSystemDataGrid
FileSystemEnumerationMode

2011/10/13

ADOBE AIR

15

AIR API

FileSystemHistoryButton
FileSystemList
FileSystemSizeDisplayMode
FileSystemTree
FlexNativeMenu
HTML
Window
WindowedApplication
WindowedSystemManager
Flex 4 spark AIR

Window
WindowedApplication
AIR Flex Flex AIR

2011/10/13

16

4 : AIR Adobe Flash


Platform
Adobe Flash Platform AIR
ActionScript 3.0 Flash Flex

Adobe Flash Professional AIR


Adobe Flex 3.x 4.x SDK 17 Flex SDK 125 AIR Developer Tool (ADT)
Adobe Flash Builder Flash Builder AIR
HTML Ajax

Adobe AIR SDK 16 AIR SDK 125 AIR Developer Tool (ADT)
Adobe Dreamweaver CS3 CS4 CS5 Dreamweaver AIR

AIR SDK
Adobe AIR SDK
AIR Debug Launcher (ADL) AIR 121 AIR Debug Launcher

(ADL)
AIR Development Tool (ADT) AIR 125 AIR Developer Tool

(ADT)
AIR Java JRE JDK 1.5 Java
/http://java.sun.com/ Java JRE Java JDK
ADT 2GB
AIR Java

AIR SDK AIR 30 AIR SDK HTML AIR

AIR SDK
AIR SDK
Windows AIR SDK

AIR SDK
AIR SDK AIR SDK

C:\Program Files\Adobe\AIRSDK C:\AIRSDK


ADL ADT AIR SDK bin PATH
Mac OS X AIR SDK

AIR SDK

2011/10/13

ADOBE AIR

17

AIR Adobe Flash Platform

AIR SDK AIR SDK

/Users/<userName>/Applications/AIRSDK
ADL ADT AIR SDK bin PATH
Linux AIR SDK

SDK tbz2
SDK SDK tar -jxvf <path to AIR-SDK.tbz2>
AIR SDK AIR

AIR SDK
AIR SDK
SDK

bin

AIR Debug Launcher (ADL) AIR


121 AIR Debug Launcher (ADL)

AIR Developer Tool (ADT) AIR


125 AIR Developer Tool (ADT)

frameworks

libs AIR
projects SWF SWC

include

include C

install

install Android Windows USB Google


Android SDK

lib

AIR SDK

runtimes

AIR
ADL AIR
Android AIR APK Android
APK Android Market

Android AIR
samples

(badge.swf) AIR

templates

descriptor-template.xml - AIR
154 AIR

AIR XML

Flex SDK
Adobe Flex Adobe AIR

Adobe Flash Builder Adobe AIR AIR


19 Flash Builder Flex AIR

Adobe Flex SDK Flex AIR

2011/10/13

ADOBE AIR

18

AIR Adobe Flash Platform

Flex SDK AIR 33 Flex SDK AIR

Flex SDK
AIR Java JRE JDK 1.5 Java
http://java.sun.com/ Java JRE JDK
AIR Java

Flex SDK AIR API AIR


1 Flex SDKhttp://opensource.adobe.com/wiki/display/flexsdk/Downloads
2 SDK Flex SDK
3 AIR SDK Flex SDK
Mac SDK Mac

ditto
AIR SDK Flex SDK ditto air_sdk_folder flex_sdk_folder

4 AIR bin

SDK
Android iOS SDK
Android SDK Android SDK AIR 2.6 Android

SDK AIR SDK APK


Android SDK

iOS SDK Apple

2011/10/13

19

5 : AIR
Flash Builder Flex AIR
Adobe AIR Adobe Flash Builder
SWF AIRHello World
Flash Builder Adobe AIR

www.adobe.com/go/air_cn

AIR
Flash Builder AIR
Flash Builder Flex Builder AIR Flex

1 Flash Builder
2 > >Flex
3 AIRHelloWorld
4 Flex AIR
Adobe Flash Player Web
Adobe AIR
Desktop

AIR MXML XML

Flash Builder AIR

AIR
Hello World MXML (AIRHelloWorld.mxml)
Project Navigator
Flex AIR MXML WindowedApplication MXML WindowedApplication

1 WindowedApplication title "Hello World"


<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
title="Hello World">
</s:WindowedApplication>

2 Label WindowedApplication Label text "Hello


AIR"

2011/10/13

ADOBE AIR

20

AIR

<?xml version="1.0" encoding="utf-8"?>


<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
title="Hello World">
<s:Label text="Hello AIR" horizontalCenter="0" verticalCenter="0"/>
</s:WindowedApplication>

3 Label WindowedApplication
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
s|WindowedApplication
{
skinClass:ClassReference("spark.skins.spark.SparkChromeWindowedApplicationSkin");
background-color:#999999;
background-alpha:"0.7";
}
</fx:Style>

<?xml version="1.0" encoding="utf-8"?>


<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
title="Hello World">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
s|WindowedApplication
{
skinClass:ClassReference("spark.skins.spark.SparkChromeWindowedApplicationSkin");
background-color:#999999;
background-alpha:"0.7";
}
</fx:Style>
<s:Label text="Hello AIR" horizontalCenter="0" verticalCenter="0"/>
</s:WindowedApplication>

1 Flex Navigator AIRHelloWorld


AIRHelloWorld-app.xml

2 Flash Builder
3 XML systemChrome transparent initialWindow "<!--"
"-->"

4 systemChrome none
<systemChrome>none</systemChrome>

5 transparent true
<transparent>true</transparent>

2011/10/13

ADOBE AIR

21

AIR

AIR

> >AIRHelloWorld
AIR

2 Label horizontalCenter verticalCenter

Flash Builder

AIR
Hello World AIR AIR
bin SWF XML AIR

1
2 >
3 AIRHelloWorld AIRHelloWorld.mxml
4 AIR
5
6
7
8 AIRHelloWorld.air AIR
Flash Builder Project Navigator AIR

2011/10/13

ADOBE AIR

22

AIR

Flash Professional AIR


Adobe AIR Adobe Flash Professional
Hello WorldAIR
Adobe AIRwww.adobe.com/go/air_cn

Flash Hello World


Flash Adobe AIR FLA Flash Professional
Hello World
Hello World

1 Flash
2 AIR Adobe AIR FLA
3 15-20
4 Hello World
5 HelloAIR

1 Ctrl + Enter -> -> Adobe AIR


2 ActionScript trace

trace("Running AIR application using Debug Movie");

3 Ctrl + Shift + Enter -> ->

Hello World

2011/10/13

ADOBE AIR

23

AIR

1 >
2 Adobe AIR
a
b /
c 1024-RSA 1024 2048-RSA 2048

d ...

C:/Temp/mycert.pfx
e Flash

b Adobe AIR
143 AIR

3 Flash CS4 CS5 AIR


SWF application.xml

4 AIR (application.air)
5
6
7

Flash Professional AIR for Android

AIR for Android Adobe Labs Flash Professional CS5 for Android
Android Android SDK Android SDK

1 Flash Professional CS5


2 AIR for Android

Flash Professional AIR for Android >


AIR for Android

3 HelloWorld.fla

Hello, World!

1 >AIR Android
2
HelloWorld.apk

2011/10/13

ADOBE AIR

24

AIR

HelloWorld
IDHelloWorld
0.0.1

3
AIR Android Marketplace

Android 2033
Android

Android SDK ADB
4 Android
AIR for Android

5
Android

1 USB > Settings USB


2 USB
3 AIR Android Market Adobe AIR 133

ADT installRuntime AIR AIR SDK Android Android


4 >

Flash Professional APK Android

iOS AIR
AIR 2.6 iOS 4.2
Adobe iOS iOS iOS
Apple iOS iOS iOS
Provisioning Portal Apple


ID

Hello world! SWF Flash ProfessionalFlash Builder IDE


Flex SDK SWF

1 HelloWorld.as

2011/10/13

ADOBE AIR

25

AIR

2
package{
import
import
import
import

flash.display.Sprite;
flash.text.TextField;
flash.text.TextFormat;
flash.text.TextFieldAutoSize;

public class HelloWorld extends Sprite


{
public function HelloWorld():void
{
var textField:TextField = new TextField();
textField.text = "Hello World!";
textField.autoSize = TextFieldAutoSize.LEFT;
var format:TextFormat = new TextFormat();
format.size = 48;
textField.setTextFormat ( format );
this.addChild( textField );
}
}
}

3 amxmlc
amxmlc HelloWorld.as

SWF HelloWorld.swf
amxmlc 237

amxmlc

iOS iTunes

1
2 PNG Icon_29.png Icon_57.png Icon_512.png
3 PNG 2929 5757 512512

Apple 512 JPG PNG

PNG
iPhone iPhone PNG

1 Default.png PNG

Default.png D
2 320 480
71

2011/10/13

ADOBE AIR

26

AIR

IDE Flash Builder

1 HelloWorld.as HelloWorld-app.xml XML XML

2 XML
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/2.7" minimumPatchLevel="0">
<id>change_to_your_id</id>
<name>Hello World iOS</name>
<versionNumber>0.0.1</versionNumber>
<filename>HelloWorld</filename>
<supportedProfiles>mobileDevice</supportedProfiles>
<initialWindow>
<content>HelloWorld.swf</content>
<title>Hello World!</title>
</initialWindow>
<icon>
<image29x29>icons/AIRApp_29.png</image29x29>
<image57x57>icons/AIRApp_57.png</image57x57>
<image512x512>icons/AIRApp_512.png</image512x512>
</icon>
</application>

AIR 2 <version> <versionNumber>

3 ID iOS Provisioning Portal ID ID

4 ADL
adl HelloWorld-app.xml -screensize iPhone

ADL Hello World!

IPA
ADT IPA Apple P12 Apple

ADT keystore storepass provisioning-profile


adt -package -target ipa-debug
-keystore iosPrivateKey.p12 -storetype pkcs12 -storepass qwerty12
-provisioning-profile ios.mobileprovision
HelloWorld.ipa
HelloWorld-app.xml
HelloWorld.swf icons Default.png

ADT iOS HelloWorld.ipa IPA

2011/10/13

ADOBE AIR

27

AIR

iOS

1 iTunes
2 iTunes iTunes >
mobileprovision

iTunes Store iTunes Store

56 iOS

3 iTunes iTunes

4 IPA iTunes
5 USB
6 iTunes
7 iTunes Hello World

iPhone
iTunes
ID

Default.png 25
PNG iPhone
Hello World!

1 Hello World
/ iPhone

2 iPhoto Mac OS

Photos



3 PNG Default.png
4 26 IPA

Default.png 320 480 Default.png

2011/10/13

ADOBE AIR

28

AIR

Dreamweaver HTML AIR


Adobe AIR Adobe AIR Extension for Dreamweaver
HTML AIRHello World
Adobe AIRwww.adobe.com/go/air_cn
Dreamweaver Adobe AIR Dreamweaver Adobe AIR
Dreamweaver AIR
extendedDesktop HTML AIR tv

Adobe AIR Dreamweaver


1 Dreamweaver
2 HTML > HTML

3 Hello World!

4 hello_world.html > Dreamweaver


Dreamweaver Dreamweaver

Adobe AIR
1 Dreamweaver hello_world.html
2 >Air

AIR

3 hello_world.html
4
Adobe AIR

5 AIR

Dreamweaver
7
8

2011/10/13

ADOBE AIR

29

AIR

AIR

Dreamweaver AIR

9 AIR

Dreamweaver Adobe AIR Dreamweaver


application.xml

1 Adobe AIR Dreamweaver


Dreamweaver

2 .air

Adobe AIR
AIR

1 Dreamweaver hello_world.html

2011/10/13

ADOBE AIR

30

AIR

2 / AIR
Ctrl+Shift+F12 (Windows) Cmd+Shift+F12 (Macintosh)

AIR SDK HTML AIR


Adobe AIR HTML AIRHello

World
AIR SDK AIR Debug Launcher (ADL) AIR Developer Tool
(ADT) ADL ADT AIR SDK bin 16 AIR SDK

Adobe Dreamweaver 28 Dreamweaver HTML AIR


extendedDesktop HTML AIR tv

HTML AIR HTML


JavaScript AIRAliases.js AIR API

1 HelloWorld
2 HelloWorld-app.xml XML
3 HelloWorld.html HTML
4 AIR SDK frameworks AIRAliases.js

AIR
AIR XML
<application xmlns="...">
<id></id>
<versionNumber></versionNumber>
<filename></filename>
<initialWindow>
<content></content>
<visible></visible>
<width></width>
<height></height>
</initialWindow>
</application>

1 HelloWorld-app.xml
2 <application> AIR
<application xmlns="http://ns.adobe.com/air/application/2.7"> 2.7

3 <id>

2011/10/13

ADOBE AIR

31

AIR

<id>examples.html.HelloWorld</id> ID ID AIR
ID

4 <versionNumber>
<versionNumber>0.1</versionNumber>
AIR 2 <version> <versionNumber>

5 <filename>
<filename>HelloWorld</filename>
6 <initialWindow>
<content>HelloWorld.html</content> AIR HTML
<visible>true</visible>
<width>400</width>
<height>200</height>
7
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.7">
<id>examples.html.HelloWorld</id>
<versionNumber>0.1</versionNumber>
<filename>HelloWorld</filename>
<initialWindow>
<content>HelloWorld.html</content>
<visible>true</visible>
<width>400</width>
<height>200</height>
</initialWindow>
</application>


154 AIR

HTML
HTML AIR

1 HelloWorld.html HTML
<html>
<head>
<title>Hello World</title>
</head>
<body onLoad="appLoad()">
<h1>Hello World</h1>
</body>
</html>

2 HTML <head> AIRAliases.js


<script src="AIRAliases.js" type="text/javascript"></script>

AIR HTML window runtime runtime


AIR AIR File JavaScript
var textFile = new runtime.flash.filesystem.File("app:/textfile.txt");

2011/10/13

ADOBE AIR

32

AIR

AIRAliases.js AIR API AIRAliases.js File


var textFile = new air.File("app:/textfile.txt");

3 AIRAliases JavaScript onLoad


<script type="text/javascript">
function appLoad(){
air.trace("Hello World");
}
</script>

appLoad() air.trace() ADL Trace

4
HelloWorld.html
<html>
<head>
<title>Hello World</title>
<script type="text/javascript" src="AIRAliases.js"></script>
<script type="text/javascript">
function appLoad(){
air.trace("Hello World");
}
</script>
</head>
<body onLoad="appLoad()">
<h1>Hello World</h1>
</body>
</html>

AIR Debug Launcher (ADL) ADL AIR SDK

bin AIR SDK 16 AIR SDK

1
2
adl HelloWorld-app.xml

AIR air.trace()
154 AIR

AIR
ADT AIR AIR
Adobe AIR AIR
AIR ADT
VeriSign Thawte AIR
AIR
AIR AIR AIR
AIR ActionScript AIR HTML

2011/10/13

ADOBE AIR

33

AIR

ADT AIR SDK bin


adt -certificate -cn SelfSigned 1024-RSA sampleCert.pfx samplePassword

ADT sampleCert.pfx keystore


1024-RSA 2048-RSA 143 AIR

AIR


adt -package -storetype pkcs12 -keystore sampleCert.pfx HelloWorld.air
HelloWorld-app.xml HelloWorld.html AIRAliases.js

keystore

HelloWorld.air ADT AIR HelloWorld-app.xml


ADT
HelloWorld.html AIRAliases.js
AIR AIR

AIR HTML JavaScript Web AIR Safari Web


WebKit AIR HTML
HTML JavaScript

Flex SDK AIR


Adobe AIR Flex SDK SWF
AIRHello World Flex SDK AIR Flex
SDK AIR SDK
Adobe Flex AMXMLC AIR (ADL) AIR
(ADT) Flex SDK bin 17 Flex SDK

AIR
XML
<application xmlns="...">
<id>...</id>
<versionNumber>...</versionNumber>
<filename></filename>
<initialWindow>
<content></content>
<visible></visible>
<width></width>
<height></height>
</initialWindow>
</application>

1 HelloWorld-app.xml XML
2011/10/13

ADOBE AIR

34

AIR

2 <application> AIR
<application xmlns="http://ns.adobe.com/air/application/2.7"> 2.7

3 <id>
<id>samples.flex.HelloWorld</id> ID ID AIR
DNS "com.company.AppName"
ID

4 <versionNumber>
<versionNumber>1.0</versionNumber>
AIR 2 <version> <versionNumber>

5 <filename>
<filename>HelloWorld</filename>
6 <initialWindow>
<content>HelloWorld.swf</content> AIR SWF
<visible>true</visible>
<width>400</width>
<height>200</height>
7
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.7">
<id>samples.flex.HelloWorld</id>
<versionNumber>0.1</versionNumber>
<filename>HelloWorld</filename>
<initialWindow>
<content>HelloWorld.swf</content>
<visible>true</visible>
<width>400</width>
<height>200</height>
</initialWindow>
</application>


154 AIR

SWF AIR MXML Adobe ActionScript 3.0 MXML

ActionScript AIR MXML SWF


ActionScript ActionScript flash.display.Sprite
Flex Flex AIR MXML AIR
WindowedApplication Application WindowedApplication
AIR Application
Flex View TabbedViewNavigatorApplication
Hello World

1 HelloWorld.mxml MXML

2011/10/13

ADOBE AIR

35

AIR

<?xml version="1.0" encoding="utf-8"?>


<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
title="Hello World">
</s:WindowedApplication>

2 Label WindowedApplication
3 Label text "Hello AIR"
4

<?xml version="1.0" encoding="utf-8"?>


<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
title="Hello World">
<s:Label text="Hello AIR" horizontalCenter="0" verticalCenter="0"/>
</s:WindowedApplication>

amxmlc MXML SWF Flex SDK bin


amxmlc Flex SDK bin

1 AIR
2
amxmlc HelloWorld.mxml

amxmlc HelloWorld.swf
amxmlc

117 AIR MXML ActionScript

AIR Debug Launcher (ADL)


Flex SDK bin ADL

2011/10/13

ADOBE AIR

36

AIR

adl HelloWorld-app.xml

AIR

Label horizontalCenter verticalCenter

121 AIR Debug Launcher (ADL)

AIR
ADT AIR AIR
Adobe AIR AIR
AIR ADT
AIR
AIR AIR
AIR AIR AIR
ActionScript AIR HTML

Flex SDK bin ADT


adt -certificate -cn SelfSigned 1024-RSA sampleCert.pfx samplePassword

1024-RSA 2048-RSA 143 AIR



AIR


adt -package -storetype pkcs12 -keystore sampleCert.pfx HelloWorld.air
HelloWorld-app.xml HelloWorld.swf

keystore Enter

HelloWorld.air ADT AIR HelloWorld-app.xml

AIR AIR

46 AIR

2011/10/13

ADOBE AIR

37

AIR

Flex SDK AIR for Android


AIR Flex SDK Flex SDK AMXMLC AIR Debug Launcher

(ADL) AIR SDK AIR Developer Tool (ADT) 17 Flex SDK


Android Android SDK Android SDK
iPhone Flash Professional CS5 Hello World iPhone

AIR
XML
<application xmlns="...">
<id>...</id>
<versionNumber>...</versionNumber>
<filename></filename>
<initialWindow>
<content></content>
</initialWindow>
<supportedProfiles>...</supportedProfiles>
</application>

1 HelloWorld-app.xml XML
2 <application> AIR
<application xmlns="http://ns.adobe.com/air/application/2.7"> 2.7

3 <id>
<id>samples.android.HelloWorld</id> ID ID AIR
DNS "com.company.AppName"

4 <versionNumber>
<versionNumber>0.0.1</versionNumber>
5 <filename>
<filename>HelloWorld</filename>
6 <initialWindow>
<content>HelloWorld.swf</content> AIR HTML
7 <supportedProfiles>
<supportedProfiles>mobileDevice</supportedProfiles>
8
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.7">
<id>samples.android.HelloWorld</id>
<versionNumber>0.0.1</versionNumber>
<filename>HelloWorld</filename>
<initialWindow>
<content>HelloWorld.swf</content>
</initialWindow>
<supportedProfiles>mobileDevice</supportedProfiles>
</application>

2011/10/13

ADOBE AIR

38

AIR

<fullScreen>true</fullScreen> initialWindow Android


Android
60

HelloWorld.as
package
{
import flash.display.Sprite;
import flash.text.TextField;
public class HelloWorld extends Sprite
{
public function HelloWorld()
{
var textField:TextField = new TextField();
textField.text = "Hello, World!";
stage.addChild( textField );
}
}
}

amxmlc MXML SWF Flex SDK bin


amxmlc Flex SDK bin

1 AIR
2
amxmlc HelloWorld.as

amxmlc HelloWorld.swf
amxmlc

117 AIR MXML ActionScript

AIR Debug Launcher (ADL)


AIR Flex SDK bin ADL


adl HelloWorld-app.xml

80 ADL

APK
ADT AIR APK

Android

2011/10/13

ADOBE AIR

39

AIR

Android AIR Android

Android ADT Android


Android Market 25

Flex SDK bin ADT


adt -certificate -validityPeriod 25 -cn SelfSigned 1024-RSA sampleCert.pfx samplePassword

1024-RSA 2048-RSA 131 ADT

certificate
AIR


adt -package -target apk -storetype pkcs12 -keystore sampleCert.p12 HelloWorld.apk HelloWorld-app.xml
HelloWorld.swf

keystore Enter
74 AIR
AIR
Android Market AIR Android SDK


adt -installRuntime -platform android -platformsdk

-platformsdk Android SDK

ADT SDK Runtime.apk


84 AIR
AIR


adt -installApp -platform android -platformsdk path-to-android-sdk -package path-to-app

-platformsdk Android SDK


84 AIR

2011/10/13

40

6 : AIR
AIR
AIR

FlashFlex ActionScript Flash ProfessionalFlash Builder mxmlc compc


HTML JavaScript
ADL AIR Flash ProfessionalFlash

BuilderDreamweaver Aptana IDE Flash ADL


FDB ADL trace
AIR AIR

API NativeProcess

AIR

SWF
1 MXML ActionScript
2
3
4 ActionScript
5
6 air AIR

HTML
1 HTML JavaScript
2
3
4
5 air AIR

AIR
1 ActionScript HTML JavaScript
2
3 extendedDesktop
4 ActionScript
5

2011/10/13

ADOBE AIR

41

AIR

6 native
Mac Windows

VMWare

AIR
1 ActionScript HTML JavaScript
2
3 extendedDesktop
4 ActionScript
5
6 bundle
7 AIR SDK
Mac Windows VMWare

AIR 154 AIR


AIR
AIR
application AIR 1.5
AIR 3.0 AIR 1.5 AIR 3.0
WebKit
application xmlns :
<application xmlns="http://ns.adobe.com/air/application/3.0">

158 application

ID
<id>com.example.MyApplication</id>
<name>My Application</name>
<filename>MyApplication</filename>

2011/10/13

ADOBE AIR

42

AIR

169 id
165 filename
176 name

AIR 2.5 version AIR 2.0


1.0
<!-- AIR 2 or earlier -->
<version>1.23 Beta 7</version>

AIR 2.5 versionNumber version versionNumber


:0.1.2
999.999.999 1 1.0
versionLabel

<!-- AIR 2.5 and later -->


<versionNumber>1.23.7<versionNumber>
<versionLabel>1.23 Beta 7</versionLabel>

182 version
183 versionLabel
183 versionNumber

AIR SWF HTML AIR initialWindow

content initalWindow content SWF

SWF HTML
<initialWindow>
<content>MyApplication.swf</content>
</initialWindow>

AIR ADT IDE

height
maximizable
maxSize
minimizable
minSize
renderMode AIR 3 auto cpu direct gpu
AIR renderMode

auto cpu

2011/10/13

ADOBE AIR

43

AIR

cpu StageVideo Stage3D

direct StageVideo

Stage3D true
gpu
resizable
systemChrome systemChrome
title
transparent alpha

visible

width
x
y

162 content
168 height
175 maximizable
175 maxSize
176 minimizable
176 minimizable
176 minSize
178 renderMode
179 resizable
181 systemChrome
182 title
182 transparent
183 visible
184 width
184 x
185 y

customUpdateUI false AIR

2011/10/13

ADOBE AIR

44

AIR

fileTypes
AIR NativeApplication setAsDefaultApplication()

-bundle

installFolder

programMenuFolder Windows

163 customUpdateUI
167 fileTypes
172 installFolder
177 programMenuFolder

NativeProcess extendedDesktop
supportedProfile

<supportedProfiles>desktop extendedDesktop</supportedProfiles>

desktop extendedDesktop ActionScript 187

180 supportedProfiles

extendedDesktop
AIR
<extensions>
<extensionID> com.example.extendedFeature</extensionID>
<extensionID> com.example.anotherFeature</extensionID>
</extensions>

extensionID id extension.xml XML


ANE

16x16

32x32 48x48 128x128 PNG

2011/10/13

ADOBE AIR

45

AIR

<icon>
<image16x16>assets/icon16.png</image16x16>
<image32x32>assets/icon32.png</image32x32>
<image48x48>assets/icon48.png</image48x48>
<image128x128>assets/icon128.png</image128x128>
</icon>

168 icon
169 imageNxN

android
aspectRatio
autoOrients
fullScreen
iPhone
renderMode AIR 3
requestedDisplayResolution
softKeyboardBehavior

AIR
IDE Flash Builder Flash Professional Dreamweaver
IDE AIR Debug Launcher (ADL) Flash

Debugger (FDB)

De MonsterMonster Debugger
218 AIR HTML

ADL
ADL AIR ADL
ActionScript
adl myApplication-app.xml

ADL trace HTML FDB ADL

ADL AIR
adl -extdir extensionDirs myApplication-app.xml

2011/10/13

ADOBE AIR

46

AIR

121 AIR Debug Launcher (ADL)

trace
trace ADL trace() trace

ActionScript
//ActionScript
trace("debug message");

JavaScript
//JavaScript
air.trace("debug message");

JavaScript alert() confirm()


JavaScript
JavaScript air AIRAliases.js AIR SDK
frameworks

Flash Debugger (FDB)


Flash Debugger AIR FDB ADL
SWF AIR -debug ActionScript Flash Professional

1 FDB Flex SDK bin FDB


FDB <fdb>

2 run <fdb>run [Enter]


3
adl myApp.xml

4 FDB
5 continue [Enter]
AIR SWF ActionScript AIR HTML
JavaScript
ADL -nodebug
adl myApp.xml -nodebug

FDB help
<fdb>help [Enter]

FDB Flex

AIR
AIR SWF HTML
AIR

2011/10/13

ADOBE AIR

47

AIR

SDK AIR Adobe

Adobe Flex Builder Flex Builder AIR


Adobe Flash Builder Flash Builder AIR
Adobe Flash Professional Adobe AIR
Adobe Dreamweaver Dreamweaver AIR
AIR AIR

ADT -package AIR -prepare


-sign
Java 1.5 PKCS12 ASCII

ASCII

2011/10/13

ADOBE AIR

48

AIR

ADT AIR
AIR ADT
AIR
AIR
180 AIR
-migrate 130 ADT migrate
180

AIR 1.5.3

AIR
AIR 1.1 SDK 1.1
AIR ADT
AIR supportedProfiles 186
180 supportedProfiles
AIR 154 AIR

ID
AIR 1.5.3 ID AIR 1.5.3 ID
AIR ID
ID publisherID

ID META-INF/AIR publisherid
ID ID AIR 1.5.3

AIR 1.5.3 AIR AIR 1.5.3 SDK


ID ID ID ID

AIR



AIR API
OSID /
AIR 1.5.3

ID ID ID AIR
Flash AIR ID
AIR 1.5.3 ID publisherID
AIR ID ID

ADT
AIR ADT AIR ActionScript MXML

2011/10/13

ADOBE AIR

49

AIR

ADT 125 AIR Developer Tool (ADT)


AIR
AIR ADT package air
adt -package -target air -storetype pkcs12 -keystore ../codesign.p12 myApp.air myApp-app.xml myApp.swf icons

ADT shell 237

myApp-app.xml

myApp.swf
ADT keystore Enter
AIRI AIR
AIRI AIR
adt -sign -storetype pkcs12 -keystore ../codesign.p12 myApp.airi myApp.air

AIR 2 ADT AIR Windows


EXE AIR Mac OS DMG AIR
AIR 2.5 AIR 2.6 Linux DEB RPM AIR

ADT AIR supportedProfiles


186 180 supportedProfiles
AIR

SWF HTML

AIR AIRI
ADT Windows EXE
Windows ADT Mac OS DMG Mac OS ADT Linux DEB RPG
Linux AIR 2.6 SDK ADT
AIR

NativeProcess
AIR ActionScript
AIR HTML

File.openWithDefaultApplication()

File.openWithDefaultApplication()
AIR
updater

2011/10/13

ADOBE AIR

50

AIR

AIR Adobe AIR


Adobe AIR Adobe

AIR 2
Mac

Linux chmod

-package
adt -package AIR_SIGNING_OPTIONS
-target native
[WINDOWS_INSTALLER_SIGNING_OPTIONS]
installer_file
app_xml
[file_or_dir | -C dir file_or_dir | -e file dir ...] ...

AIR

-target native -target air ADT AIR


DMG EXE installer_file
Windows [WINDOWS_INSTALLER_SIGNING_OPTIONS]
Windows AIR Windows AIR
135 ADT AIR
Web Windows

Windows
-target ADT 125 AIR Developer Tool (ADT)
DMG Mac OS
adt -package
-storetype pkcs12
-keystore myCert.pfx
-target native
myApp.dmg
application.xml
index.html resources

EXE Windows
adt -package
-storetype pkcs12
-keystore myCert.pfx
-target native
myApp.exe
application.xml
index.html resources

EXE
adt -package
-storetype pkcs12
-keystore myCert.pfx
-target native
-storetype pkcs12
-keystore myCert.pfx
myApp.exe
application.xml
index.html resources

2011/10/13

ADOBE AIR

51

AIR

-package

adt -package AIR_SIGNING_OPTIONS


-target native
[WINDOWS_INSTALLER_SIGNING_OPTIONS]
installer_file
app_xml
-extdir extension-directory
[file_or_dir | -C dir file_or_dir | -e file dir ...] ...

-extdir extension-directory
ANE
ADT 125 AIR Developer Tool (ADT)
DMG Mac OS
adt -package
-storetype pkcs12
-keystore myCert.pfx
-target native
myApp.dmg
application.xml
-extdir extensionsDir
index.html resources

AIR AIRI
ADT AIR AIRI AIR
ADT -package
adt -package
-target native
[WINDOWS_INSTALLER_SIGNING_OPTIONS]
installer_file
air_file

AIR

AIR AIR
AIR
AIRI ADT -package
adt AIR_SIGNING_OPTIONS
-package
-target native
[WINDOWS_INSTALLER_SIGNING_OPTIONS]
installer_file
airi_file

AIR

AIRI
AIR
AIR DMG Mac OS
adt -package -target native myApp.dmg myApp.air

AIR EXE Windows


adt -package -target native myApp.exe myApp.air

2011/10/13

ADOBE AIR

52

AIR

AIR EXE
adt -package -target native -storetype pkcs12 -keystore myCert.pfx myApp.exe myApp.air

AIRI DMG Mac OS


adt -storetype pkcs12 -keystore myCert.pfx -package -target native myApp.dmg myApp.airi

AIRI EXE Windows


adt -storetype pkcs12 -keystore myCert.pfx -package -target native myApp.exe myApp.airi

EXE AIRI AIR Windows


adt -package -storetype pkcs12 -keystore myCert.pfx -target native -storetype pkcs12 -keystore myCert.pfx
myApp.exe myApp.airi

Windows Mac OS .app


VMWare


Internet




NativeProcess API

File.openWithDefaultApplication()
USB

Adobe
.air

AIR API
AIR AIR API
Windows

2011/10/13

ADOBE AIR

53

AIR

Windows
Windows Windows ADT bundle

adt -package
-keystore ..\cert.p12 -storetype pkcs12
-target bundle
myApp
myApp-app.xml
myApp.swf icons resources

myApp
URI AIR SDK

WIndows -target bundle


Windows AIR

Windows

fileTypes
Windows MSDN Library: File Types and File Associations

URI
URI URL
URI MSDN Library: Registering an Application to a URL Protocol

Mac OS X
Mac OS X Macintosh ADT bundle

adt -package
-keystore ../cert.p12 -storetype pkcs12
-target bundle
myApp.app
myApp-app.xml
myApp.swf icons resources

myApp.app myApp.app
Applications URI

(.dmg) Adobe AIR SDK dmg

Mac OS X info.plist

CFBundleDocumentTypes Mac OS X Developer Library: Information Property List Key Reference,


CFBundleURLTypes
URI
URI URL info.plist CFBundleURLTypes
Mac OS X Developer Library: Information Property List Key Reference, CFBundleDocumentTypes

2011/10/13

ADOBE AIR

54

AIR

AIR
AIR AIR
CD-ROM AIR AIR
API Web ActionScript AIR Adobe AIR

AIR Windows EXE Mac DMG


Linux DEB RPM
AIR AIR
API

AIR
AIR AIR
AIR

1 AIR
Adobe AIR

2
Windows AIR

Program Files


/
Mac OS Applications
AIR
AIR ID ID

3
Mac OS
Windows Linux
ActionScript JavaScript 197 AIR
AIR

Windows
Linux
Mac OS /Applications
AIR 2.6 AIR Linux

AIR AIR AIR


AIR

2011/10/13

ADOBE AIR

55

AIR

AIR
AIR API AIR AIR API Adobe SWF air.swf
AIR SDK AIR
Web air.swf
AIR

<allowBrowserInvocation>true</allowBrowserInvocation>

190 AIR.SWF API


Web AIR

IT Adobe AIR AIR IT


Microsoft SMS IBM Tivoli

Adobe AIR
AIR
Adobe AIR (http://www.adobe.com/go/learn_air_admin_guide_cn)

AIR AIR

Mac (/private/var/log/system.log)
Mac

Windows XPC:\Documents and Settings\<username>\Local Settings\Application Data\Adobe\AIR\logs\Install.log


Windows Vista Windows 7C:\Users\<username>\AppData\Local\Adobe\AIR\logs\Install.log
Linux/home/<username>/.appdata/Adobe/AIR/Logs/Install.log
AIR 2 AIR

2011/10/13

56

7 : AIR
AIR AIR AIR
Android APK iOS IPA

Android Android Market iOS Apple


AIR SDK Flash ProfessionalFlash Builder ActionScript AIR
HTML AIR
Research In Motion (RIM) BlackBerry Playbook AIR SDK Playbook

RIMBlackBerry Tablet OS
AIR 2.6 SDK iOS AIR 2.6+ iOS 4

iPhone 3GiPhone 4 iPad iOS AIR iPhone


AIR 2 Packager for iPhone
AIR Adobe AIR

AIR Flex Flash AIR


16 AIR Adobe Flash Platform

Android
AIR 2.6+ Android Android ADB AIR SDK lib/android/bin
AIR SDK ADB ADB
Android Android SDK
<manifestAdditions> AIR
Android SDK AIR_ANDROID_SDK_HOME -platformsdk SDK
AIR ADT SDK <manifestAdditions>
AIR 2.5 Google Android SDK AIR_ANDROID_SDK_HOME
Android SDK ADT -platformsdk Android

SDK

141 ADT
237

iOS
iOS Apple iOS
iOS iOS Provisioning Portal Apple


ID

2011/10/13

ADOBE AIR

57

AIR

Flash Platform Flash AIR

Paul Trani Flash


roguishGPU AIR
Jonathan CamposAIR for Android
Charles SchulzeAIR 2.6 iOS

AIR 4

Geolocation Accelerometer AIR NativeApplication


14

2011/10/13

ADOBE AIR

58

AIR

AIR AIR NativeApplication systemIdleMode

AIR Android
Android READ_PHONE_STATE Android
65 Android

44

57

Android
URL

AIR File

Android iOS

2011/10/13

ADOBE AIR

59

AIR

Android

iOS

File.applicationDirectory

URL

File.applicationStorageDirectory

File.desktopDirectory

SDCard

File.documentsDirectory

SDCard

File.userDirectory

SDCard

File.createTempDirectory()

File.createTempFile()

UI
Adobe Flex http://labs.adobe.com/technologies/flex/mobile/

Keith Peters Minimal Comps


Derrick Grigg Minimal Comps
Todd Anderson as3flobile

AIR
AIR
AIR for Android Android APK AIR
Android

AIR for Android


Android AIR

ActionScript MXML
AIR 2.5

Android (.apk)
Android AIR
Android

Adobe Flash Builder Adobe Flash Professional CS5
AIR APK Android Market

2011/10/13

ADOBE AIR

60

AIR

AIR for iOS


iOS AIR

iTunes
Apple iOS Provisioning Portal ID

ID

ID

P12 keystore
ActionScript MXML
ActionScript MXML

2.6
ADT IPA
iTunes
iOS iTunes IPA
AIR Apple

AIR
Android android
iOS iPhone

AIR
AIR
application AIR 2.7
AIR 2.7

Android AIR
iPhone

application xmlns

2011/10/13

ADOBE AIR

61

AIR

iOS 4+ and iPhone 3Gs+ or Android:


<application xmlns="http://ns.adobe.com/air/application/2.7">
iOS only:
<application xmlns="http://ns.adobe.com/air/application/2.0">

AIR 2.0 SDK Packager for iPhone SDK iOS 3 iOS 3 AIR

iPhone AIR 2.6 SDK iPhone 3G iPhone 4 iPad iOS 4

158 application

ID

Android ID
Android AIR ID air. Android AIR ID
com.example.MyApp Android air.com.example.MyApp
<id>com.example.MyApp</id>
<name>My Application</name>
<filename>MyApplication</filename>

ID Android ID
A ID3-goats.1-boatair.A3_goats.A1_boat
ID Android Market AIR

AIR APK ID Opt-out of AIR application analytics for


Android
iOS ID
AIR ID Apple iOS Provisioning Portal ID
iOS ID ID ID Apple ID
5RM86Z4DJM (*) ID

Apple ID 5RM86Z4DJM.com.example.helloWorld
com.example.helloWorld

Apple ID 96LPVWEASL.com.example.* ID
com.example.helloWorld com.example.anotherApp com.example ID

Apple ID ID 38JE93KJL.* AIR

ID
ID ID ID

169 id
165 filename
176 name

2011/10/13

ADOBE AIR

62

AIR

AIR 2.5 versionNumber version versionNumber


:0.1.2
999.999.999 1 1.0
versionLabel Android
Android Market AIR
versionLabel versionNumber Android
<!-- AIR 2.5 and later -->
<versionNumber>1.23.7<versionNumber>
<versionLabel>1.23 Beta 7</versionLabel>

Android AIR versionNumber Android versionCodea*1000000 + b*1000 + c ab

c AIR a.b.c

182 version
183 versionLabel
183 versionNumber

SWF
initialWindow content SWF SWF
HTML
<initialWindow>
<content>MyApplication.swf</content>
</initialWindow>

AIR ADT IDE

initialWindow
aspectRatio portrait landscape
<aspectRatio>landscape</aspectRatio>

autoOrients
false
<autoOrients>true</autoOrients>

fullScreen
<fullScreen>true</fullScreen>

renderMode (GPU) (CPU) GPU


PixelBender GPU
GPU GPU

gpu cpu auto auto CPU Flex

GPU
<renderMode>gpu</renderMode>

2011/10/13

ADOBE AIR

63

AIR

GPU
Flex GPU

PixelBender
Alpha
GPU
GPU
softKeyboardRect

GPU
AIR 2.6 iOS GPU AIR 2.0

161 aspectRatio
161 autoOrients
167 fullScreen
178 renderMode

supportedProfiles mobileDevice
Adobe Debug Launcher (ADL) ADL
ADL -profile
supportedProfiles ADL

<supportedProfiles>mobileDevice desktop</supportedProfiles>

180 supportedProfiles
186
121 AIR Debug Launcher (ADL)

mobileDevice
AIR
<extensions>
<extensionID> com.example.extendedFeature</extensionID>
<extensionID> com.example.anotherFeature</extensionID>
</extensions>

extensionID id extension.xml XML


ANE

2011/10/13

ADOBE AIR

64

AIR

softKeyboardBehavior none

softKeyboardRect SoftKeyboardEvent

pan
<softKeyboardBehavior>pan</softKeyboardBehavior>

pan softKeyboardBehavior
GPU

179 softKeyboardBehavior

Stage.softKeyboardRect
SoftKeyboardEvent

Android
Android android Android Android
APK ADT Android Manifest.xml AIR
AIR android Manifest.xml

AIR android Android

Android
AIR Android
manifest
manifest

package
android:versionCode
android:versionName
xmlns:android

activity
activity

android:label
android:icon

2011/10/13

ADOBE AIR

65

AIR

application
application
android:theme
android:name
android:label
android:windowSoftInputMode
android:configChanges
android:screenOrientation
android:launchMode

uses-sdk
uses-sdk

Android
Android
Android
Android
Android
AIR android Android

PERMISSION_NAME Android
<android>
<manifestAdditions>
<![CDATA[
<manifest>
<uses-permission android:name="android.permission.PERMISSION_NAME" />
</manifest>
]]>
</manifestAdditions>
</android>

manifest uses-permissions Android


AIR

ACCESS_COARSE_LOCATION Geolocation WIFI


ACCESS_FINE_LOCATION Geolocation GPS
ACCESS_NETWORK_STATE ACCESS_WIFI_STATE NetworkInfo
CAMERA
Android

uses-feature false 67 Android

INTERNET
READ_PHONE_STATE AIR

RECORD_AUDIO
WAKE_LOCK DISABLE_KEYGUARD SystemIdleMode
WRITE_EXTERNAL_STORAGE

2011/10/13

ADOBE AIR

66

AIR

<android>
<manifestAdditions>
<![CDATA[
<manifest>
<uses-permission
<uses-permission
<uses-permission
<uses-permission
<uses-permission
<uses-permission
<uses-permission
<uses-permission
<uses-permission
<uses-permission
<uses-permission
</manifest>
]]>
</manifestAdditions>
</android>

android:name="android.permission.ACCESS_COARSE_LOCATION" />
android:name="android.permission.ACCESS_FINE_LOCATION" />
android:name="android.permission.ACCESS_NETWORK_STATE" />
android:name="android.permission.ACCESS_WIFI_STATE" />
android:name="android.permission.CAMERA" />
android:name="android.permission.DISABLE_KEYGUARD" />
android:name="android.permission.INTERNET" />
android:name="android.permission.READ_PHONE_STATE" />
android:name="android.permission.RECORD_AUDIO" />
android:name="android.permission.WAKE_LOCK" />
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Android
Android Manifest.permission

Android URI
URI Android AIR URI Android

URI <android> intent-filter


<data android:scheme="my-customuri"/> URI
<android>
<manifestAdditions>
<![CDATA[
<manifest>
<application>
<activity>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="my-customuri"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
</android>

Android URI

URI

2011/10/13

ADOBE AIR

67

AIR

URI NativeApplication invoke URL

InvokeEvent arguments
StageWebView URI URL

Android
Android

Android
Android
Android Android

Android

supports-screens
uses-configuration
uses-feature

Android
uses-feature
Android Market

<android>
<manifestAdditions>
<![CDATA[
<manifest>
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
</manifest>
]]>
</manifestAdditions>
</android>

Android

uses-feature Android Market

<android>
<manifestAdditions>
<![CDATA[
<manifest>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.microphone" android:required="false"/>
</manifest>
]]>
</manifestAdditions>
</android>

2011/10/13

ADOBE AIR

68

AIR

Android Android
Android Android

Android manifest installLocation auto preferExternal

<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="preferExternal"/>
]]>
</manifestAdditions>
</android>

Android


File.userDirectory
File.documentsDirectory Android SD SDCard

StageWebView Flash Player


Android 3.0 Android StageWebView
application android:hardwareAccelerated true
<android>
<manifestAdditions>
<![CDATA[
<manifest>
<application android:hardwareAccelerated="true"/>
</manifest>
]]>
</manifestAdditions>
</android>

AIR Android AIR Android 2.2 SDK


Android 3.0 android:hardwareAccelerated AIR ADT Android 3.0 SDK

Android 3 SDKAndroid SDK -platformsdk Android

SDK Android tools


adt -package
-target apk
-storetype pkcs12 -keystore cert.p12 -storepass foo
myApp.apk
myApp-app.xml
-platformsdk c:\androidSDK
myApp.swf
other.files

AIR_ANDROID_SDK_HOME Android SDK Flash Builder Flash

Professional AIR SDK


Android SDK 141 ADT

2011/10/13

ADOBE AIR

69

AIR

AIR 3+
AIR 3 32 AIR 16
<colorDepth> 16
<android>
<colorDepth>16bit</colorDepth>
<manifestAdditions>...</manifestAdditions>
</android>

16

iOS
iOS <iPhone> iPhone InfoAdditions

requestedDisplayResolution
InfoAdditions Info.plist
Wi-Fi
<InfoAdditions>
<![CDATA[
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UIRequiresPersistentWiFi</key>
<string>NO</string>
]]>
</InfoAdditions>

InfoAdditions CDATA
Info.plist Apple

iOS InfoAdditions
AIR Info.plist
CFBundleDisplayName

CTAutoOrients

CFBundleExecutable

CTInitialWindowTitle

CFBundleIconFiles

CTInitialWindowVisible

CFBundleIdentifier

DTPlatformName

CFBundleInfoDictionaryVersion

DTSDKName

CFBundlePackageType

MinimumOSVersion

CFBundleResourceSpecification

NSMainNibFile

CFBundleShortVersionString

UIInterfaceOrientation

CFBundleSupportedPlatforms

UIStatusBarHidden

CFBundleVersion

UISupportedInterfaceOrientations

2011/10/13

ADOBE AIR

70

AIR

iOS
iPad InfoAdditions UIDeviceFamily UIDeviceFamily
<string>1</string> iPhone iPod Touch <string>2</string>
iPad iPad
<key>UIDeviceFamily</key>
<array>
<string>2</string>
</array>>

iPhone/iPod Touch iPad


<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>

requestedDisplayResolution iOS standard


high
<requestedDisplayResolution>high</requestedDisplayResolution>

standard requestedDisplayResolution iPhone InfoAdditions

179 requestedDisplayResolution

Renaun Erickson AIR 2.6 Retina Retina iOS

iOS URI
URI URI
CFBundleURLTypes InfoAdditions com.example.app URI
example://foo URL
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>example</string>
</array>
<key>CFBundleURLName</key>
<string>com.example.app</string>
</dict>
</array>

URI NativeApplication invoke URL

InvokeEvent arguments URI


StageWebView URI URL
URI

2011/10/13

ADOBE AIR

71

AIR

iOS
InfoAdditions

UIRequiredDeviceCapabilities
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>microphone</string>
<string>still-camera</string>
</array>

AIR
telephony

camera-flash

wifi

video-camera

sms

accelerometer

still-camera

location-services

auto-focus-camera

gps

front-facing-camera

microphone

AIR 2.6 armv7 opengles-2


UIRequiredDeviceCapabilities

AIR
UIApplicationExitsOnSuspend YES
<key>UIApplicationExitsOnSuspend</key>
<true/>

29x29

iOS

36x36

Android

48x48

Android, iOS

57x57

iOS

72x72

Android, iOS

114x114

iOS

512x512

iOS

2011/10/13

ADOBE AIR

72

AIR

<icon>
<image36x36>assets/icon36.png</image36x36>
<image48x48>assets/icon48.png</image48x48>
<image72x72>assets/icon72.png</image72x72>
</icon>

Android
Android Launcher Launcher 36x36
48x48 72x72 PNG
iOS
iOS

29 x 29 iPhone iPod Spotlight


48 x 48 iPad Spotlight
57 x 57 iPhone iPod Touch
72 x 72 iPad
114 x 114 iPhone iPod Touch 960 x 640
512 512 iTunes Apple 512 PNG
JPG 512 IPA

iOS
InfoAdditions
<InfoAdditions>
<![CDATA[
<key>UIPrerenderedIcon</key>
<true/>
]]>
</InfoAdditions>

iOS Adobe AIR for iOS Adobe Apple iOS

AIR AIR IPA


AIR iOS

168 icon
169 imageNxN

Android
iOS

iOS
Default.png
URL

2011/10/13

ADOBE AIR

73

AIR

basename + urischeme + orientation + scale + device + .png

basename Default D InfoAdditions

UILaunchImageFile

urischeme URI example://foo


example
orientation
-Portrait
-PortraitUpsideDown
-Landscape
-LandscapeLeft
-LandscapeRight
scale @2x scale

device ~ipad ~iphone iPhone iPod Touch


iPhone 320x480

640x960
iPad (1024x748) (768x1004) iPad

URL

example://

Default.png

320 x 480

iPhone

Default@2x.png

640 x 960

iPhone

Default-Portrait.png

768 x 1004

iPad

Default-PortraitUpsideDown.png

768 x 1004

iPad

Default-Landscape.png

1024 x 748

iPad

Default-LandscapeRight.png

1024 x 748

iPad

Default-example.png

320 x 480

example:// iPhone URL

Default-example@2x.png

640 x 960

example:// iPhone URL

Default-example~ipad.png

768 x 1004

example:// iPad URL

Default-example-Landscape.png

1024 x 748

example:// iPad URL

iPad Default.png Default~iphone.png

Default@2x~iphone.png iPhone iPod

iOS Application Programming Guide: Application Launch Images

2011/10/13

ADOBE AIR

74

AIR

1 iOS
/

2 iPhoto

iOS Human Interface Guidelines: Launch images

allowBrowserInvocation
customUpdateUI
fileTypes
height
installFolder
maximizable
maxSize
minimizable
minSize
programMenuFolder
resizable
systemChrome
title
transparent
visible
width
x
y

AIR
ADT -package AIR -target

Android
Android AIR Android (APK) AIR

2011/10/13

ADOBE AIR

75

AIR

ADT APK Android Market Android Market


Android Market
AIR Android Market

Market 2033 ADT -certificate


Developer Serge Jespers Package Assistant Pro AIR Android AIR
http://www.webkitchen.be/package-assistant-pro/
Market Market Google Market AIR ADT

-airDownloadURL URL AIR


URL 126 ADT package
AIR 3 AIR Android AIR
AIR

iOS
iOS AIR iOS (IPA) AIR
ADT ipa-app-store Apple
ipa-ad-hoc
Apple

Ant iOS Piotr Walczyszyn ADT ANT iOS AIR

ADT
AIR SDK 2.6 iOS Android ActionScript MXML

ADT 125 AIR Developer Tool (ADT)

Android APK
APK
APK ADT apk apk-debug
apk-emulator
adt -package
-target apk
-storetype pkcs12 -keystore ../codesign.p12
myApp.apk
myApp-app.xml
myApp.swf icons

ADT
shell 237
myApp-app.xml

myApp.swf
ADT keystore Enter

2011/10/13

ADOBE AIR

76

AIR

APK
APK -extdir
ANE
adt -package
-target apk
-storetype pkcs12 -keystore ../codesign.p12
myApp.apk
myApp-app.xml
-extdir extensionsDir
myApp.swf icons

AIR APK
AIR APK apk-captive-runtime
ANE
adt -package
-target apk-captive-runtime
-storetype pkcs12 -keystore ../codesign.p12
myApp.apk
myApp-app.xml
myApp.swf icons

Adobe
RAM
ADT INTERNET BROADCAST_STICKY AIR

APK
apk-debug
adt -package
-target apk-debug
-connect 192.168.43.45
-storetype pkcs12 -keystore ../codesign.p12
myApp.apk
myApp-app.xml
myApp.swf icons

-connect AIR USB listen TCP

2011/10/13

ADOBE AIR

77

AIR

adt -package
-target apk-debug
-listen 7936
-storetype pkcs12 -keystore ../codesign.p12
myApp.apk
myApp-app.xml
myApp.swf icons

SWF SWC -connect -listen


137
Android Internet 65

Android
APK Android
Android APK APK
ADT package apk-emulator
adt -package -target apk-emulator -storetype pkcs12 -keystore ../codesign.p12 myApp.apk myApp-app.xml
myApp.swf icons

ADT shell 237

AIR AIRI APK


AIR AIRI APK
adt -target apk -storetype pkcs12 -keystore ../codesign.p12 myApp.apk myApp.air

AIR AIR 2.5

iOS
iOS ADT SWF iOS

1 iPhone
2 ADT IPA
adt -package
-target [ipa-test | ipa-debug | ipa-app-store | ipa-ad-hoc]
-provisioning-profile PROFILE_PATH
SIGNING_OPTIONS
TARGET_IPA_FILE
APP_DESCRIPTOR
SOURCE_FILES
-extdir extension-directory

adt adt adt AIR SDK bin


iPhone -target

-target ipa-test iPhone


-target ipa-debug iPhone
iPhone trace()
-connect (CONNECT_OPTIONS) IP

-connect
-connect IP_ADDRESS IP
-target ipa-debug -connect 192.0.32.10

2011/10/13

ADOBE AIR

78

AIR

-connect HOST_NAME
-target ipa-debug -connect bobroberts-mac.example.com

-connect
IP wifi

80 AIR

-target ipa-ad-hoc Apple iPhone


-target ipa-app-store Apple IPA
PROFILE_PATH 56 iOS
SIGNING_OPTIONS iPhone
-storetype pkcs12 -keystore P12_FILE_PATH -storepass PASSWORD

P12 P12_FILE_PATH PASSWORD P12


149 P12 keystore
APP_DESCRIPTOR
SOURCE_FILES SWF Flash CS5

Default.png
-extdir extension-directory ANE

Resources IPA

Resources
iOS
iOS ADT package ios-debug
Apple
adt -package
-target ipa-debug
-storetype pkcs12 -keystore ../AppleDevelopment.p12
-provisioning-profile AppleDevelopment.mobileprofile
-connect 192.168.0.12
myApp.ipa
myApp-app.xml
myApp.swf icons Default.png

ADT
shell 237
myApp-app.xml

myApp.swf Default.png
Apple
-connect IP Flash (FDB)
81 Flash
iOS Apple
iOS Apple ADT package ios-app-store
Apple

2011/10/13

ADOBE AIR

79

AIR

adt -package
-target ipa-app-store
-storetype pkcs12 -keystore ../AppleDistribution.p12
-provisioning-profile AppleDistribution.mobileprofile
myApp.ipa
myApp-app.xml
myApp.swf icons Default.png

ADT
shell 237
myApp-app.xml

myApp.swf Default.png
Apple
Apple Application Loader Apple Mac OS X

Application Loader Windows iPhone AIR OS X


10.5.3 Apple iOS
Application Loader
iOS
iOS ADT package ios-ad-hoc
Apple
adt -package
-target ipa-ad-hoc
-storetype pkcs12 -keystore ../AppleDistribution.p12
-provisioning-profile AppleDistribution.mobileprofile
myApp.ipa
myApp-app.xml
myApp.swf icons Default.png

ADT
shell 237
myApp-app.xml

myApp.swf Default.png
Apple
iOS
iOS -extdir ADT ipa-app-store ipa-debug

ipa-ad-hoc ipa-test ADT


adt -package
-target ipa-ad-hoc
-storetype pkcs12 -keystore ../AppleDistribution.p12
-provisioning-profile AppleDistribution.mobileprofile
myApp.ipa
myApp-app.xml
-extdir extensionsDir
myApp.swf icons Default.png

extensionsDir extensionsDir ANE

2011/10/13

ADOBE AIR

80

AIR

AIR
AIR ADL
Flash

ADL
Adobe Debug Launcher (ADL)
ADL supportedProfiles
ADL ADL -profile supportedProfiles
supportedProfiles -profile

adl -profile mobileDevice myApp-app.xml

ActionScript API ADL

ADL ADL ADL


ADL ADL

ADL ADL
autoOrients true

ADL -screensize
ADL Motorola Droid

adl -screensize 480x816:480x854 myApp-app.xml

121 ADL

ADL API API


Accelerometer
cacheAsBitmapMatrix
CameraRoll
CameraUI
Geolocation

SystemIdleMode

2011/10/13

ADOBE AIR

81

AIR

ADL API

Speex AAC

RTMPE
ActionScript SWF
PixelBender
ADL

Trace
trace ADL
trace
trace
SWF trace

Android trace
Android Android SDK Android Debug Bridge (ADB)
Android trace

tools/adb logcat air.MyApp:I *:S

MyApp AIR ID *:S trace


ActivityManager Logcat
tools/adb logcat air.MyApp:I ActivityManager:I *:S

Android SDK ADB SDK


AIR 2.6+ ADB AIR SDK lib/android/bin

iOS trace
iOS trace Flash (FDB)

Android Debug Bridge Logcat


237

Flash
Flash

Android android:permission.INTERNET
SWF
Android -target apk-debug iOS -target ipa-debug -connect
USB IP Flash

TCP 7935

2011/10/13

ADOBE AIR

82

AIR

Flash Professional

1 AIR Android
2

Android
Android
Android SDK
3

4 AIR Android
5 Flash Professional > >ActionScript 3

Flash Professional
6
7 Adobe AIR Flash IP

FDB
Flash Debugger (FDB)
AMXMLC FDB ADT
Flex AIR SDK bin
1
2 amxmlc
amxmlc -debug DebugExample.as

3 apk-debug ipa-debug
Android
adt -package -target apk-debug -connect -storetype pkcs12 -keystore ../../AndroidCert.p12
DebugExample.apk DebugExample-app.xml DebugExample.swf
iOS
adt -package -target ipa-debug -connect -storetype pkcs12 -keystore ../../AppleDeveloperCert.p12 provisioning-profile test.mobileprovision DebugExample.apk DebugExample-app.xml DebugExample.swf

IP -connect IP

4
Android ADT -installApp
adt -installApp -platform android -package DebugExample.apk

iOS iTunes

5 FDB
fdb

6 FDB run

2011/10/13

ADOBE AIR

83

AIR

Adobe fdb (Flash Player Debugger) [build 14159]


Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
(fdb) run
Waiting for Player to connect

7
8 Adobe AIR -

connect IP
TCP 7935

9 FDB break continue


(fdb) run
Waiting for Player to connect
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
[SWF] Users:juser:Documents:FlashProjects:DebugExample:DebugExample.swf - 32,235 bytes after
decompression
(fdb) break clickHandler
Breakpoint 1 at 0x5993: file DebugExample.as, line 14
(fdb) continue

USB FDB
AIR 2.6 Android
USB -listen -connect -listen
TCP 7936 Flash (FDB) -p FDB FDB
Flash AIR Android SDK

Android Debug Bridge (ADB)


1
2 amxmlc
amxmlc -debug DebugExample.as

3 apk-debug -listen
adt -package -target apk-debug -listen -storetype pkcs12 -keystore ../../AndroidCert.p12 DebugExample.apk
DebugExample-app.xml DebugExample.swf

4 USB USB

5
ADT -installApp
adt -installApp -platform android -package DebugExample.apk

6 Android ADB TCP 7936


adb forward tcp:7936 tcp:7936

7
8 -p FDB
fdb -p 7936

9 FDB run

2011/10/13

ADOBE AIR

84

AIR

Adobe fdb (Flash Player Debugger) [build 14159]


Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
(fdb) run

10 FDB
11 FDB break continue
(fdb) run
Player connected; session starting.
Set breakpoints and then type 'continue' to resume the session.
[SWF] Users:juser:Documents:FlashProjects:DebugExample:DebugExample.swf - 32,235 bytes after
decompression
(fdb) break clickHandler
Breakpoint 1 at 0x5993: file DebugExample.as, line 14
(fdb) continue

7936 AIR FDB USB ADT -listen FDB -p

Android Debug Bridge ADT FDB


adb forward tcp:adt_listen_port# tcp:fdb_port#

AIR AIR
AIR AIR
Android Android Market
Web
Android AIR Market
iOS Apple

AIR
AIR
ADT AIR AIR Android
iOS iTunes Apple
AIR iOS
ADT AIR
AIR ADT IDE

ADT
AIR ADT AIR SDK -installRuntime
adt -installRuntime -platform android -device deviceID -package path-to-runtime

-package AIR SDK


AIR -installApp
adt -installApp -platform android -device deviceID -package path-to-app

-device -platform
android
AIR AIR

2011/10/13

ADOBE AIR

85

AIR

iOS AIR
iOS AIR

1 iTunes
2 iTunes iTunes >
mobileprovision

3 iTunes iTunes

4 IPA iTunes
5 USB
6 iTunes
7 iTunes Hello World

iPhone
iTunes
ID

133 ADT installRuntime


131 ADT installApp

AIR
AIR AIR ADT
adt -launchApp -platform android -device deviceID -appid applicationID

-appid AIR ID AIR air.


-device -platform
android

AIR
AIR ADT AIR
-uninstallRuntime
adt -uninstallRuntime -platform android -device deviceID

-uninstallApp
adt -uninstallApp -platform android -device deviceID -appid applicationID

-device -platform
android

AIR SDK
AIR AIR

2011/10/13

ADOBE AIR

86

AIR

Android
1 Android SDK AVD Manager
Windows Android SDK SDK Setup.exe
Mac OS Android SDK android
2 Settings Force https://
3 Available Packages Android SDK
4 Android SDK Android 2.2 Install Selected
5 Virtual Devices New
6

API Android 2.2 API 8
SD 1024
HVGA
7 Create AVD
Virtual Device
Virtual Device

1 AVD Manager Virtual Device


2 Virtual Device Start
3 Launch
Android
apk-debug apk-emulator apk

http://developer.android.com/guide/developing/tools/othertools.html#android
http://developer.android.com/guide/developing/tools/emulator.html

AIR
AIR

Market
AIR AIR Updater

Android AIR
Android Market Market AIR
Market

APK
AIR ID
versionNumber versionLabel

2011/10/13

ADOBE AIR

87

AIR

Android Market

Android Android Market

iOS AIR
iTunes AIR Apple
AIR

Apple ID
IPA Apple Bundle ID
iOS 3 iOS 3

AIR SDK 2.6 iOS 3 AIR 2 iOS AIR

2 AIR 2.6

2011/10/13

88

8 : AIR
Adobe AIR Adobe AIR
AIR SWF HTML AIR

AIR AIR


AIR

AIR AIR
tv AIR AIR
extendedTV AIR
186 ActionScript Adobe Flash Platform

ActionScript 3.0 AIR ActionScript


AIR 105

AIR 90
AIR

AIR
Adobe Adobe

Adobe
AIR Adobe Flash Access

Flash Access


HTTP Flash Media Server RTMP
HTTP
AIR RTMPE RTMP Flash

Media Server RTMPE SWF

2011/10/13

ADOBE AIR

89

AIR

Adobe Flash Access


Flash Access 2.0
Adobe Flash Access (PDF)
Adobe Flash

AIR 3 AIR HTTP

AC-3 (Dolby Digital)


E-AC-3 Dolby Digital
DTS Digital Surround
DTS Express
DTS-HD High Resolution Audio
DTS-HD Master Audio
Adobe Flash Media Server

AIR 3 AIR ActionScript API


AIR
API

GameInput ActionScript API GameInput

Stage 3D
AIR 3 AIR Stage 3D Stage3D ActionScript API 2D 3D
GPU API API GPU
Stage3D ActionScript API
3D Stage 3D

extendedTV ANE AIR


ANE AIR

ANE AIR AIRN AIR


AIR AIR
ANE ActionScript ActionScript

AIR
2011/10/13

ADOBE AIR

90

AIR

AIR
AIR
AIR
AIR 112 Adobe AIR
Adobe AIR

AIR

Adobe

H.264

720i 720p 1080i 1080p

24 30

AAC-LC AC-344.1 kHzE-AC-3DTSDTS


Express DTS-HD High Resolution Audio DTS-HD Master Audio

8M bps

192 Kbps

11

AIR Adobe H.264


AIR Sorenson Spark On2 VP6

H.264

StageVideo
AIR H.264 StageVideo
ActionScript 3.0 StageVideo

StageVideo API
StageVideo
Video H.264 AIR AIR StageVideo
Video StageVideo

StageVideo H.264
StageVideo Flash Platform

2011/10/13

ADOBE AIR

91

AIR

AIR Internet

Adobe Flash Media Server


(OSMF)
AIR

HTTP HTTPS F4F


RTMP RTMPE RTMFP RTMPT RTMPTE
HTTP HTTPS

Adobe Flash Media Server


Open Source Media Framework

AIR ActionScript AIR ActionScript


ActionScript 3.0
AIR

AIR HTTP Adobe Flash Media Server

AIR AIR

flash.system.Capabilities hasMultiChannelAudio() AIR


AC-3
H.264
hasMultiChannelAudio()

Capabilities.serverString

DTS hasMultiChannelAudio() true DTS


S/PDIF DTS S/PDIF
DTS DTS

AIR AIR
CPU

2011/10/13

ADOBE AIR

92

AIR

H.264

AAC
MP4

AIR

AAC

Internet

mp3

SWF

mp3 H.264

AIR

Sorenson Spark On2 VP6

AC-3 (Dolby Digital)

H.264

AIR
/

E-AC-3 Dolby
Digital
DTS Digital Surround
DTS Express
DTS-HD High Resolution
Audio
DTS-HD Master Audio
Speex

Speex H.264

AIR Speex
Sorenson Spark On2 VP6

NellyMoser

NellyMoser H.264
AIR NellyMoser
Sorenson Spark On2 VP6

AAC AC3 AIR

AIR 2D CPU





AIR




alpha

2011/10/13

ADOBE AIR

93

AIR

MovieClip cacheAsBitmap true


alpha

X Y cacheAsBitmapMatrix
Matrix

cacheAsBitmap true Matrix

Matrix

cacheAsBitmap true

AIR Matrix
AIR Matrix

BitmapData

AIR

Bitmap bitmapData
dispose()
myBitmap.bitmapData.dispose();

BitmapData

dispose()

PerfMaster Deluxe Adobe AIR


PerfMaster Deluxe
Flash Platform PerfMaster Deluxe

visible false AIR


visible false

null

PNG JPEG
PNG JPEG AIR
AIR JPEG

2011/10/13

ADOBE AIR

94

AIR

AIR PNG PNG


PNG Alpha

JPEG
PNG alpha

AIR
AIR Stage

540p 720p 1080p ActionScript Capabilities

Capabilities.screenResolutionX

Capabilities.screenResolutionY

540p

960

540

720p

1280

720

1080p

1920

1080

AIR Stage.stageWidth Stage.stageHeight


Capabilities.screenResolutionX

Capabilities.screenResolutionY

stage.stageWidth = Capabilities.screenResolutionX;
stage.stageHeight = Capabilities.screenResolutionY;

Adobe 7.5%

2011/10/13

ADOBE AIR

95

AIR

1920
1632

918

1080

1920 x 1080

AIR



7.5

960 x 540

816 x 460

72

40

1280 x 720

1088 x 612

96

54

1920 x 1080

1632 x 918

144

81

var horizontalInset, verticalInset, safeAreaWidth, safeAreaHeight:int;


horizontalInset = .075 * Capabilities.screenResolutionX;
verticalInset = .075 * Capabilities.screenResolutionY;
safeAreaWidth = Capabilities.screenResolutionX - (2 * horizontalInset);
safeAreaHeight = Capabilities.screenResolutionY - (2 * verticalInset);

Stage.scaleMode StageScaleMode.NO_SCALE resize


stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, layoutHandler);

FULL_SCREEN_INTERACTIVE TOP_LEFT

Stage stageWidth stageHeight Capabilities

screenResolutionX screenResolutionY

2011/10/13

ADOBE AIR

96

AIR

Stage resize

NO_SCALE AIR AIR

Stage.align StageAlign.TOP_LEFT
stage.align = StageAlign.TOP_LEFT;

0,0 ActionScript
NO_SCALE FULL_SCREEN_INTERACTIVE

AIR Stage.displayState StageDisplayState.FULL_SCREEN_INTERACTIVE


stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

AIR

Adobe FULL_SCREEN_INTERACTIVE NO_SCALE TOP_LEFT

ADDED_TO_STAGE
private function onStage(evt:Event):void
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, onResize);
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
}

RESIZE

RESIZE
FULL_SCREEN_INTERACTIVE


private function onResize(evt:Event):void
{
if ((Capabilities.screenResolutionX == stage.stageWidth) &&
(Capabilities.screenResolutionY == stage.stageHeight))
{
// Calculate and save safe viewing area dimensions.
}
}

Capabilities.screenResolutionX screenResolutionY AIR

Capabilities.screenResolutionX screenResolutionY

AIR AIR 1280 x 720 1920


x 1080 AIR 1920 x 1080
1080p

2011/10/13

ADOBE AIR

97

AIR

AIR AIR

1 scaleMode align displayState StageScaleMode.NO_SCALE StageAlign.TOP_LEFT


StageDisplayState.FULL_SCREEN_INTERACTIVE

2 Capabilities.screenResolutionX Capabilities.screenResolutionY
3

ActionScript Flash

AIR Stage.quality StageQuality.High

AIR
KeyboardEvent.KEY_DOWN ActionScript 3.0

ActionScript

ActionScript 3.0

Keyboard.UP

Keyboard.DOWN

Keyboard.LEFT

Keyboard.RIGHT

Keyboard.ENTER

AIR 2.5 Keyboard Adobe Flash Platform


ActionScript 3.0 Keyboard
Adobe

2011/10/13

ADOBE AIR

98

AIR

AIR


AIR

tab tab AIR


tab DisplayObject tabEnabled

Keyboard KeyboardEvent.KEY_DOWN

Keyboard
Stage.focus Stage.assignFocus() DisplayObject

AIR

AIR

SWF
SWF
AIR AIR AIR

20

Adobe Flash Platform


AIR 60 Hz 120 Hz 60 120 60 Hz

120 Hz 30 60

100 200

2011/10/13

ADOBE AIR

99

AIR

AIR 3


97

AIR

AIR

AIR
AIR

_sans

_sans AIR _sans Myriad


Pro sans-serif serif

_serif

_serif AIR _serif Minion

Pro
_typewriter

_typewriter AIR _typewriter


Courier Std

AIR

2011/10/13

ADOBE AIR

100

AIR

RyoGothicPlusN-Regular

sans

ja

RyoTextPlusN-Regular

serif

ja

AdobeGothicStd-Light

sans

ko

AdobeHeitiStd-Regular

sans

zh_CN

AdobeSongStd-Light

serif

zh_CN

AdobeMingStd-Light

serif

zh_TW
zh_HK

AIR

Adobe



AIR

Adobe FontMaster Deluxe Flash Platform

AIR ActionScript 3.0

TLF Adobe

TLF TLFTextField

TextLayoutFormat locale ActionScript 3.0

AIR TextLayoutFormat fontFamily


AIR AIR locale
AIR

fontFamily _sans_serif _typewriter locale AIR

AIR AIR

AIR

TLF

AIR

TextField cacheAsBitmap true


alpha cacheAsBitmapMatrix

2011/10/13

ADOBE AIR

101

AIR

AIR AIR

AIR ActionScript 3.0


ActionScript
AIR
AIR

AIR
AIR AIR AIR
AIR 101

AIR

AIR

flash.events.Event.EXITING

HTTP cookie
AIR HTTP cookie cookie AIR AIR cookie

/app-storage/<app id>/Local Store

Cookie cookies
AIR cookie cookie

AIR
ActionScript URLRequest.manageCookies

manageCookies true AIR HTTP cookie

HTTP cookie
manageCookies true URLRequest.requestHeaders HTTP cookie

cookie AIR cookie cookie cookie

manageCookies false HTTP cookie HTTP cookie

URLRequest

2011/10/13

ADOBE AIR

102

AIR

AIR
Adobe Flash Platform AIR

Adobe Flash Professional

Adobe Flash Professional CS5.5 AIR 2.5 AIR AIR


Adobe Flash Builder

Flash Builder 4.5 AIR 2.5


AIR SDK
AIR 2.5 AIR SDK AIR SDK
http://www.adobe.com/products/air/sdk/

Flash Professional
Flash Professional AIR AIR
ActionScript 3.0 tv extendedTV AIR
186

AIR

Flash AIR 2.5


Adobe AIR TV extended TV

Flash Professional AIR Debug Launcher

> > AIR Debug Launcher

> >

> > AIR Debug Launcher


> >
AIR TV extendedTV AIR Debug Launcher

ANE Flash Professional

ActionScript 114 ANE

Flash Professional ADT 107 ADT

2011/10/13

ADOBE AIR

103

AIR

Flash Professional ADL 108

ADL

Flash Builder
Flash Builder 4.5 Flash Builder AIR Flash Builder AIR
AIR

MXML Application MXML


<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<!-- Place elements here. -->
</s:Application>.

AIR WindowedApplication
MXML ActionScript 3.0

tv extendedTV AIR ActionScript 3.0 186



XML

application xmlns AIR 2.5


<application xmlns="http://ns.adobe.com/air/application/2.5">

supportedProfiles tv extendedTV
<supportedProfiles>tv</supportedProfiles>

Flash Builder AIR Debug Launcher


1 >
2
3 > >
supportedProfiles TV extendedTVAIR Debug Launcher

ANE Flash Builder ActionScript


114 ANE

Flash Builder ADT 107 ADT


Flash Builder ADL 108

ADL

2011/10/13

ADOBE AIR

104

AIR

TV AIR
AIR TV
extendedTV

extensions

TV

AIR
AIR
application

AIR 2.5 AIR 2.5 AIR

application xmlns
<application xmlns="http://ns.adobe.com/air/application/2.5">

AIR 2.5 TV AIR

158 application

ID
<id>com.example.MyApp</id>
<name>My Application</name>
<filename>MyApplication</filename>

169 id
165 filename
176 name

versionNumber versionNumber
0.1.2 999.999.999
1 1.0
versionLabel
<versionNumber>1.23.7<versionNumber>
<versionLabel>1.23 Beta 7</versionLabel>

2011/10/13

ADOBE AIR

105

AIR

182 version
183 versionLabel
183 versionNumber

SWF
initalWindow content SWF TV SWF
HTML
<initialWindow>
<content>MyApplication.swf</content>
</initialWindow>

AIR ADT IDE

initialWindow TV
fullScreen

fullScreen
<fullScreen>true</fullScreen>

167 fullScreen

visible
visible initialWindow AIR visible AIR

visible true
false visible
ActionScript NativeWindow

NativeWindow NativeWindow AIR


NativeWindow AIR

<supportedProfiles>tv extendedTV</supportedProfiles>

extendedTV
<supportedProfiles>extendedTV</supportedProfiles>

supportedProfiles
supportedProfiles tv extendedTV

AIR AIR supportedProfiles


tv AIR extendedTV tv

2011/10/13

ADOBE AIR

106

AIR

tv extendedTV ActionScript 187

extendedTV
AIR
<extensions>
<extensionID> com.example.extendedFeature</extensionID>
<extensionID> com.example.anotherFeature</extensionID>
</extensions>

extensionID id extension.xml XML


ANE
extensions AIR
AIR ANE
ActionScript




<icon>

168 icon
169 imageNxN

allowBrowserInvocation
aspectRatio
autoOrients
customUpdateUI
fileTypes
height
installFolder
maximizable

2011/10/13

ADOBE AIR

107

AIR

maxSize
minimizable
minSize
programMenuFolder
renderMode
resizable
systemChrome
title
transparent
visible
width
x
y

AIR
ADT
AIR ADT AIR AIR SDK 2.5 ADT TV
ActionScript MXML ADT -certificate

ADT 125 AIR Developer Tool (ADT)


AIR
AIR ADT package
adt -package -storetype pkcs12 -keystore ../codesign.p12 myApp.air myApp-app.xml myApp.swf icons

shell ADT 237


codesign.p12 ADT
myApp-app.xml myApp.swf

ADT keystore shell


Enter storepass ADT
AIRN
AIR AIRN AIR AIRN ADT

package airn
adt -package -storetype pkcs12 -keystore ../codesign.p12 -target airn myApp.airn myApp-app.xml myApp.swf
icons -extdir C:\extensions

2011/10/13

ADOBE AIR

108

AIR

shell ADT 237


codesign.p12 ADT
-extdir ANE
ANE ActionScript AIR
myApp-app.xml myApp.swf

ADT keystore shell


Enter storepass
AIR AIRI AIRI AIRN

adt -prepare myApp.airi myApp.xml myApp.swf icons -extdir C:\extensions

AIRI AIRN
adt -package -storetype pkcs12 -keystore ../codesign.p12 -target airn myApp.airn myApp.airi

Adobe AIR

Flash Builder Flash Professional


Flash Professional Flash Builder ADT AIR AIR AIR

ADT AIRN AIR

Flash Builder AIR


Adobe AIR

AIR
ADL
Adobe Debug Launcher (ADL)

ADL supportedProfiles
ADL
ADL -profile supportedProfiles
supportedProfiles -profile
tv
adl -profile tv myApp-app.xml

2011/10/13

ADOBE AIR

109

AIR

ADL tv extendedTV

-profile ActionScript API


ADL
-profile tv extendedTV ADL StageVideo
-profile extendedTV AIRN
ADL ADL AIR


StageVideo AIR StageVideo Video
StageVideo ADL

ADL -profile extendedTV


ADL ANE ActionScript

ADL
adl -profile extendedTV -extdir C:\extensionDirs myApp-app.xml

shell ADL 237


SWF

myApp-app.xml
-extdir
ANE
C:\extensionDirs
extension1.ane
META-INF
ANE
default
library.swf
extension.xml
signatures.xml
catalog.xml
library.swf
mimetype
extension2.ane
META-INF
ANE
default
library.swf
extension.xml
signatures.xml
catalog.xml
library.swf
mimetype

ANE ActionScript AIR

2011/10/13

ADOBE AIR

110

AIR

ADL TV TV ADL

ADL -screensize

adl -screensize 1024x728:1024x768 myApp-app.xml

121 AIR Debug Launcher (ADL)


Adobe AIR

Trace
TV trace ADL

Flash Professional
AIR Flash Professional
Adobe AIR MAX 2010

1 Flash
Flash Professional FLA SWF

2 Adobe AIR AIR (AIRI)

AIRI

3 AIRI

Flash Builder
AIR Flash Builder

1 > AIR (AIRI)


AIRI

2 AIRI
3 AIRI SWF
SWF Flash Builder bin-debug bin-debug
SWF AIRI SWF
Windows

1 AIRI .zip .airi

2011/10/13

ADOBE AIR

111

AIR

2 ZIP
3 bin-debug SWF SWF
4
5 .airi
Mac

1 AIRI
2 bin-debug SWF SWF
Adobe AIR for TV MAX 2010 AIRI
Mac telnet bin-debug SWF

/opt/adobe/stagecraft/apps/<application name>/ SWF


Flash Builder Adobe AIR for TV MAX 2010

1 Flash Builder MAX 2010 AIR


IP

2 DevMaster
3 DevMaster IP AIR
4 DevMaster
5 DevMaster
6 AIR
7 AIR

AIR
Flash Builder

1 Flash Builder >


2
3 Web
4
5 URL about:blank
6
7 Flash Builder
8
Flash Builder

2011/10/13

112

9 : Adobe AIR
Adobe AIR ActionScript API API

Adobe AIR

ActionScript

AIR ActionScript

ActionScript
ActionScript

ActionScript
ActionScript

Adobe Android AIR


Adobe AIR

AIR (ANE)
ANE ANE
ANE
ActionScript
AIR ANE

ANE SWC

ActionScript
AIR ANE

NativeProcess ActionScript
ActionScript 3.0 NativeProcess AIR
NativeProcess

extendedDesktop AIR NativeProcess AIR extendedTVmobileDevice


extendedMobileDevice

ActionScript API

NativeProcess ActionScript
NativeProcess AIR
NativeProcess

2011/10/13

ADOBE AIR

113

Adobe AIR

ActionScript SWC
SWC ActionScript SWC SWF SWC
ActionScript ActionScript
ANE SWC ANE ActionScript SWF
ANE SWC ANE

SWC

AIR 3

Android Android 2.2


iOS iOS 4.0
Blackberry PlayBook
AIR 3.0 Windows
AIR 3.0 Mac OS X
AIR AIR 2.5
ANE ActionScript
ActionScript
ActionScript

AIR

extendedTV AIR 2.5


extendedDesktop AIR 3.0
mobileDevice AIR 3.0
extendedMobileDevice AIR 3.0

AIR

2011/10/13

ADOBE AIR

114

Adobe AIR

1
2 ANE
3 .

AIR <extensions>

<extensions>
<extensionID>com.example.Extension1</extensionID>
<extensionID>com.example.Extension2<extensionID>
</extensions>

extensionID id extension.xml XML


ANE extension.xml

ANE
ANE

Flash Builder ANE


ANE Flash Builder ActionScript

1 Flash Builder >


2 ActionScript
3 SWC...
4 *.*
5 ANE
ANE

6 ANE
7
>

Flash Professional ANE


ANE Flash Professional CS5

ActionScript
1 ANE .ane .swc Flash Professional

2011/10/13

ADOBE AIR

115

Adobe AIR

2 FLA >ActionScript
3 ActionScript 3.0
4 SWC
5 SWC
SWC ActionScript 3.0

6 SWC
7

ADT Flash Professional Flash Builder


ADT AIR (ADT)
ADT DMG Mac OS X
adt -package
-storetype pkcs12
-keystore myCert.pfx
-target native
myApp.dmg
application.xml
index.html resources
-extdir extensionsDir

Android APK
adt -package
-target apk
-storetype pkcs12 -keystore ../codesign.p12
myApp.apk
myApp-app.xml
myApp.swf icons
-extdir extensionsDir

iPhone iOS
adt -package
-target ipa-ad-hoc
-storetype pkcs12 -keystore ../AppleDistribution.p12
-provisioning-profile AppleDistribution.mobileprofile
myApp.ipa
myApp-app.xml
myApp.swf icons Default.png
-extdir extensionsDir

AIRN AIR
adt -package -storetype pkcs12 -keystore ../codesign.p12 -target airn myApp.airn myApp-app.xml myApp.swf
icons -extdir extensionsDir



ANE

2011/10/13

ADOBE AIR

116

Adobe AIR

AIR .air
ActionScript API
ANE
ADT -target

-target

Mac OS X Windows

-target native
-target bundle

AIR

-target airn

Android

-target apk
Android

iOS

-target ipa-ad-hoc
iOS

ADT -extdir ADT ANE


137

ANE
ANE ANE

ANE

Android ANE Android-ARM ANE

iOS ANE iPhone-ARM ANE

Mac OS X ANE MacOS-x86 ANE

Windows ANE Windows-x86 ANE

AIR AIR

AIR ANE default ActionScript AIR


AIRN ANE

2011/10/13

117

10 : ActionScript
ActionScript MXML AIR Adobe Flash Builder Adobe

Flash Professional (IDE)IDE IDE


ActionScript SWF

Flex SDK AIR


Adobe AIR Flex

amxmlc mxmlc
acompc compc
aasdoc asdoc
Flex AIR AIR air-config.xml flex-config.xml

Flex Flex Flex SDK Flex SDK


Flex AIR

33 Flex SDK AIR

Flex SDK
Flex SDK frameworks Flex amxmlc
air-config.xml AIR AIR mxmlc flex-config.xml
Flex AIR

Flex Flex Flex SDK


AIR AIR AIR

Ant

AIR MXML ActionScript


MXML (amxmlc) AIR Adobe ActionScript 3.0 MXML
HTML Flash Professional SWF SWF
amxmlc
amxmlc [compiler options] -- MyAIRApp.mxml

[compiler options] AIR

2011/10/13

ADOBE AIR

118

ActionScript

amxmlc +configname=air Flex mxmlc air-config.xml


flex-config.xml amxmlc mxmlc
air-config.xml AIR AIR Flex
-load-config

-load-config=project-config.xml
-load-config+=project-config.xml -library-path

amxmlc MXML

RunningMan.mxml RunningMan-config.xml
amxmlc RunningMan.mxml

RunningMan-config.xml MXML

amxmlc
amxmlc ActionScript MXML
AIR MXML
amxmlc myApp.mxml

amxmlc output anApp.swf -- myApp.mxml

AIR ActionScript
amxmlc myApp.as

amxmlc load-config config.xml -- myApp.mxml

amxmlc load-config+=moreConfig.xml -- myApp.mxml


amxmlc library-path+=/libs/libOne.swc,/libs/libTwo.swc

-- myApp.mxml

AIR MXML (Win)


mxmlc -library-path [AIR SDK]/frameworks/libs/air/airframework.swc, ^
[AIR SDK]/frameworks/libs/air/airframework.swc, ^
-library-path [Flex 3 SDK]/frameworks/libs/framework.swc ^
-- myApp.mxml

AIR MXML Mac OS X Linux


mxmlc -library-path [AIR SDK]/frameworks/libs/air/airframework.swc, \
[AIR SDK]/frameworks/libs/air/airframework.swc, \
-library-path [Flex 3 SDK]/frameworks/libs/framework.swc \
-- myApp.mxml

AIR MXML
amxmlc -external-library-path+=../lib/myLib.swc -runtime-shared-libraries=myrsl.swf -- myApp.mxml

Java mxmlc.jar
java flex2.tools.Compiler +flexlib [Flex SDK 3]/frameworks +configname=air [additional compiler options] - myApp.mxml

2011/10/13

ADOBE AIR

119

ActionScript

flexlib Flex SDK flex_config.xml


Java
java -jar [Flex SDK 2]/lib/mxmlc.jar +flexlib [Flex SDK 3]/frameworks +configname=air [additional compiler
options] -- myApp.mxml

Apache Ant Java mxmlc.jar


<property name="SDK_HOME" value="C:/Flex3SDK"/>
<property name="MAIN_SOURCE_FILE" value="src/myApp.mxml"/>
<property name="DEBUG" value="true"/>
<target name="compile">
<java jar="${MXMLC.JAR}" fork="true" failonerror="true">
<arg value="-debug=${DEBUG}"/>
<arg value="+flexlib=${SDK_HOME}/frameworks"/>
<arg value="+configname=air"/>
<arg value="-file-specs=${MAIN_SOURCE_FILE}"/>
</java>
</target>

AIR (Flex)
acompc AIR acompc amxmlc


acompc load-config

acompc Flex compc air-config.xml flex-config.xml

acompc -load-config

ParticleManager Particle com.adobe.samples.particles


source/com/adobe/samples/particles
<flex-config>
<compiler>
<source-path>
<path-element>source</path-element>
</source-path>
</compiler>
<include-classes>
<class>com.adobe.samples.particles.ParticleManager</class>
<class>com.adobe.samples.particles.Particle</class>
</include-classes>
</flex-config>

ParticleLib-config.xml
acompc -load-config ParticleLib-config.xml -output ParticleLib.swc

acompc -source-path source -include-classes com.adobe.samples.particles.Particle


com.adobe.samples.particles.ParticleManager -output ParticleLib.swc

2011/10/13

ADOBE AIR

120

ActionScript

acompc
myLib-config.xml
AIR
acompc -load-config myLib-config.xml -output lib/myLib.swc

acompc -load-config myLib-config.xml -directory -output lib

lib

2011/10/13

121

11 : AIR Debug Launcher (ADL)


AIR Debug Launcher (ADL) SWF HTML ADL
ADL SDK
ADL

ADL trace Flash Debugger Flash


Builder Aptana Studio
AIR Adobe Flash Player
Flash Debugger AIR Debug Launcher (ADL)
Flash Debugger Flex SDK Windows fdb.exe bin Java
lib AIR Debug Launcher adl.exe Flex SDK bin Java
fdb AIR fdb Flash Player AIR AIR

fdb

ADL
ADL
adl application.xml

application.xml

ADL
adl [-runtime runtime-directory]
[-pubid publisher-id]
[-nodebug]
[-atlogin]
[-profile profileName]
[-screensize value]
[-extdir extension-directory]
application.xml
[root-directory]
[-- arguments]

[]

-runtime runtime-directory ADL SDK


ADL SDK Windows Linux Adobe AIR
Mac OS X Adobe AIR.framework

-pubid publisher-id AIR ID ID


ID AIR AIR 1.5.3
ID
AIR 1.5.3 ID AIR ID AIR

ID ID

-nodebug Flash Debugger


trace

2011/10/13

ADOBE AIR

122

AIR Debug Launcher (ADL)

-atlogin
-atlogin InvokeEvent reason login standard

-profile profileName ADL profileName



extendedDesktop
mobileDevice
tv
extendedTV
supportedProfiles -profile -

profile supportedProfiles
-profile
180 supportedProfiles 186

-screensize value mobileDevice

480

720 x 480

720 x 480

720

1280 x 720

1280 x 720

1080

1920 x 1080

1920 x 1080

Droid

480 x 816

480 x 854

FWQVGA

240 x 432

240 x 432

FWVGA

480 x 854

480 x 854

HVGA

320 x 480

320 x 480

iPad

768 x 1004

768 x 1024

iPhone

320 x 460

320 x 480

iPhoneRetina

640 x 920

640 x 960

iPod

320 x 460

320 x 480

NexusOne

480 x 762

480 x 800

QVGA

240 x 320

240 x 320

SamsungGalaxyS

480 x 762

480 x 800

SamsungGalaxyTab

600 x 986

600 x 1024

WQVGA

240 x 400

240 x 400

WVGA

480 x 800

480 x 800

widthXheight:fullscreenWidthXfullscreenHeight

NexusOne

2011/10/13

ADOBE AIR

123

AIR Debug Launcher (ADL)

-screensize 480x762:480x800

-extdir extension-directory
ANE
C:\extensionDirs\
extension1.ane\
META-INF\
ANE\
Android-ARM\
library.swf
extension1.jar
extension.xml
signatures.xml
catalog.xml
library.swf
mimetype
extension2.ane\
META-INF\
ANE\
Android-ARM\
library.swf
extension2.jar
extension.xml
signatures.xml
catalog.xml
library.swf
mimetype

-extdir

ADL .ane .ane


extensionID

-extdir
ADT ADL -extdir ADT ANE
AIR_EXTENSION_PATH 141 ADT
application.xml 154 AIR ADL

root-directory
-- arguments --
AIR invoke

ADL

adl myApp-app.xml

adl source/myApp-app.xml release

tick tock
adl myApp-app.xml -- tick tock

2011/10/13

ADOBE AIR

124

AIR Debug Launcher (ADL)

adl -runtime /AIRSDK/runtime myApp-app.xml

adl -nodebug myApp-app.xml

Nexus One
adl -profile mobileDevice -screensize NexusOne myMobileApp-app.xml

Apache Ant Windows


<property
<property
<property
<property

name="SDK_HOME" value="C:/AIRSDK"/>
name="ADL" value="${SDK_HOME}/bin/adl.exe"/>
name="APP_ROOT" value="c:/dev/MyApp/bin-debug"/>
name="APP_DESCRIPTOR" value="${APP_ROOT}/myApp-app.xml"/>

<target name="test">
<exec executable="${ADL}">
<arg value="${APP_DESCRIPTOR}"/>
<arg value="${APP_ROOT}"/>
</exec>
</target>

ADL
ADL

ADL AIR

AIR ADL

ADL

XML

<content>

SWF HTML

10

-profile

11

-screensize

2011/10/13

125

12 : AIR Developer Tool (ADT)


AIR Developer Tool (ADT) AIR ADT
AIR .air
AIR Windows .exe iOS .ipa

Android .apk
AIR (ANE)
AIR



AIR

ADT Java AIR SDK Java 1.5 SDK ADT


Java AIR SDK bin
adt ADT
237
ADT 2GB ADT
iOS
Java AIR SDK bin ADT
adt -command options

Adobe Flash BuilderAdobe Flash Professional Aptana Studio

AIR ADT
ADT ADT

ADT
ADT

-package AIR AIR (ANE)


-prepare AIR (AIRI) AIRI
-sign -prepare AIRI -prepare -sign
-sign ANE

-migrate AIR
-certificate
-checkstore keystore
-installApp AIR
-launchApp AIR
-appVersion AIR

2011/10/13

ADOBE AIR

126

AIR Developer Tool (ADT)

-uninstallApp AIR
-installRuntime AIR
-runtimeVersion AIR
-uninstallRuntime AIR
-version ADT
-help
ADT

135 ADT
137
137
138

ADT package
-package
AIR
adt -package
AIR_SIGNING_OPTIONS
-target packageType
NATIVE_SIGNING_OPTIONS
output
app_descriptor
FILE_OPTIONS

adt -package
-target packageType
DEBUGGER_CONNECTION_OPTIONS
-airDownloadURL URL
NATIVE_SIGNING_OPTIONS
output
app_descriptor
-platformsdk path
FILE_OPTIONS

AIR AIRI
adt -package
-target packageType
NATIVE_SIGNING_OPTIONS
output
input_package

ANE AIR_SIGNING_OPTIONS
adt -package
AIR_SIGNING_OPTIONS
-target ane
output
ANE_OPTIONS

2011/10/13

ADOBE AIR

127

AIR Developer Tool (ADT)

AIR_SIGNING_OPTIONS AIR AIR 135 ADT

-target
air AIR air AIR AIRI -target
airn
ane AIR
Android
apk Android Android
apk-debug Android SWF

apk-emulator Android apk-debug

apk-profile Android
iOS
ipa-ad-hoc iOS
ipa-app-store Apple iOS
ipa-debug iOS SWF
ipa-test iOS
ipa-debug-interpreter ActionScript

ipa-test-interpreter ActionScript

native
EXE Windows
DMG Mac
DEB Ubuntu Linux AIR 2.6
RPM Fedora OpenSuse Linux AIR 2.6
DEBUGGER_CONNECTION_OPTIONS
apk-debug ipa-debug 137

-airDownloadURL Android AIR URL


AIR Android Market AIR
Market Google Android Market Market
Market AIR URL Market Market AIR
Android

NATIVE_SIGNING_OPTIONS
AIR AIR_SIGNING_OPTIONS 135 ADT

Windows Android Windows AIR Android

2011/10/13

ADOBE AIR

128

AIR Developer Tool (ADT)

AIR

Android Market Google 2033


Android AIR

output -target
app_descriptor
AIR application.xml

-platformsdk SDK Android SDK AIR 2.6 SDK

Android SDK ADT Android SDK


AIR_ANDROID_SDK_HOME SDK

FILE_OPTIONS 137 AIR AIRI

input_airi AIRI air AIR_SIGNING_OPTIONS

input_air AIR AIR_SIGNING_OPTIONS


ANE_OPTIONS 138

ADT -package
SWF AIR
adt package -storetype pkcs12 -keystore cert.p12 myApp.air myApp.xml myApp.swf components.swc

HTML AIR
adt package -storetype pkcs12 -keystore cert.p12 myApp.air myApp.xml myApp.html AIRAliases.js image.gif

adt package -storetype pkcs12 -keystore ../cert.p12 myApp.air myApp.xml .

keystore AIR ADT

keystore keystore cert.p12


images
adt package -storetype pkcs12 -keystore cert.p12 myApp.air myApp.xml myApp.swf images

HTML HTML scripts images


adt package -storetype pkcs12 -keystore cert.p12 myApp.air myApp.xml index.html AIRALiases.js html scripts
images

(release/bin) application.xml SWF


adt package -storetype pkcs12 -keystore cert.p12 myApp.air release/bin/myApp.xml C release/bin myApp.swf

2011/10/13

ADOBE AIR

129

AIR Developer Tool (ADT)

/devRoot
/myApp
/release
/bin
myApp-app.xml
myApp.swf or myApp.html
/artwork
/myApp
/images
image-1.png
...
image-n.png
/libraries
/release
/libs
lib-1.swf
lib-2.swf
lib-a.js
AIRAliases.js

/devRoot/myApp ADT
adt package -storetype pkcs12 -keystore cert.p12 myApp.air release/bin/myApp-app.xml
C release/bin myApp.swf (or myApp.html)
C ../artwork/myApp images
C ../libraries/release libs

/myAppRoot
/META-INF
/AIR
application.xml
hash
myApp.swf or myApp.html
mimetype
/images
image-1.png
...
image-n.png
/libs
lib-1.swf
lib-2.swf
lib-a.js
AIRAliases.js

SWF ADT Java


java jar {AIRSDK}/lib/ADT.jar package -storetype pkcs12 -keystore cert.p12 myApp.air myApp.xml myApp.swf

HTML ADT Java


java jar {AIRSDK}/lib/ADT.jar package -storetype pkcs12 -keystore cert.p12 myApp.air myApp.xml myApp.html
AIRAliases.js

Java ADT Java ADT.jar


java -com.adobe.air.ADT package -storetype pkcs12 -keystore cert.p12 myApp.air myApp.xml myApp.swf

Apache Ant ADT Java Windows

2011/10/13

ADOBE AIR

130

AIR Developer Tool (ADT)

<property name="SDK_HOME" value="C:/AIRSDK"/>


<property name="ADT.JAR" value="${SDK_HOME}/lib/adt.jar"/>
target name="package">
<java jar="${ADT.JAR}" fork="true" failonerror="true">
<arg value="-package"/>
<arg value="-storetype"/>
<arg value="pkcs12"/>
<arg value="-keystore"/>
<arg value="../../ExampleCert.p12"/>
<arg value="myApp.air"/>
<arg value="myApp-app.xml"/>
<arg value="myApp.swf"/>
<arg value="icons/*.png"/>
</java>
</target>

ADT JRE

UTF-8 Mac Linux ADT Windows adt.bat


Java ADT Java -Dfile.encoding=UTF-8

ADT prepare
-prepare AIRI AIRI -sign AIRI AIR
package AIRI

-prepare
adt -prepare output app_descriptor FILE_OPTIONS

output AIRI
app_descriptor
AIR application.xml

FILE_OPTIONS 137

ADT sign
-sign AIRI ANE
-sign
adt -sign AIR_SIGNING_OPTIONS input output

AIR_SIGNING_OPTIONS AIR 135 ADT

input AIRI ANE


output
ANE AIR -migrate

ADT migrate
-migrate AIR

2011/10/13

ADOBE AIR

131

AIR Developer Tool (ADT)

180

AIR
AIR -package -sign -

migrate
-migrate
adt -migrate AIR_SIGNING_OPTIONS input output

AIR_SIGNING_OPTIONS AIR AIR 135 ADT


input AIR
output
AIR

ADT checkstore
-checkstore keystore
adt -checkstore SIGNING_OPTIONS

SIGNING_OPTIONS keystore 135 ADT

ADT certificate
-certificate
adt -certificate -cn name -ou orgUnit -o orgName -c country -validityPeriod years key-type output password

-cn
-ou
-o
-c ISO-3166 /
-validityPeriod
key_type 1024-RSA 2048-RSA

output
password AIR

ADT installApp
-installApp

adt -installApp -platform platformName -platformsdk path-to-sdk -device deviceID -package fileName

-platform Android android

2011/10/13

ADOBE AIR

132

AIR Developer Tool (ADT)

-platformsdk SDK Android SDK AIR 2.6 SDK

Android SDK ADT Android SDK


AIR_ANDROID_SDK_HOME SDK

-device
ADT 14 ADT

2
Android Android ADB
adb devices

-package Android APK ADT 14

ADT appVersion
-appVersion
adt -appVersion -platform platformName -platformsdk path_to_sdk -device deviceID -appid applicationID

-platform Android android


-platformsdk SDK Android SDK AIR 2.6 SDK

Android SDK ADT Android SDK


AIR_ANDROID_SDK_HOME SDK

-device
ADT 14 ADT

2
Android Android ADB
adb devices

-appid AIR ID ID ADT 14

ADT launchApp
-launchApp
adt -launchApp -platform platformName -platformsdk path_to_sdk -device deviceID -appid applicationID

-platform Android android


-platformsdk SDK Android SDK AIR 2.6 SDK

Android SDK ADT Android SDK


AIR_ANDROID_SDK_HOME SDK

-device
ADT 14 ADT

2
Android Android ADB
adb devices

2011/10/13

ADOBE AIR

133

AIR Developer Tool (ADT)

-appid AIR ID ID ADT 14

ADT uninstallApp
-uninstallApp
adt -uninstallApp -platform platformName -platformsdk path_to_sdk -device deviceID -appid applicationID

-platform Android android


-platformsdk SDK Android SDK AIR 2.6 SDK

Android SDK ADT Android SDK


AIR_ANDROID_SDK_HOME SDK

-device
ADT 14 ADT

2
Android Android ADB
adb devices

-appid AIR ID ID ADT 14

ADT installRuntime
-installRuntime AIR
AIR

adt -installRuntime -platform platformName -platformsdk path_to_sdk -device deviceID -package fileName

-platform Android android


-platformsdk SDK Android SDK AIR 2.6 SDK

Android SDK ADT Android SDK


AIR_ANDROID_SDK_HOME SDK

-device
ADT 14 ADT

2
Android Android ADB
adb devices

-package Android APK AIR SDK


ADT 14

ADT runtimeVersion
-runtimeVersion AIR
adt -runtimeVersion -platform platformName -platformsdk path_to_sdk -device deviceID

2011/10/13

ADOBE AIR

134

AIR Developer Tool (ADT)

-platform Android android


-platformsdk SDK Android SDK AIR 2.6 SDK

Android SDK ADT Android SDK


AIR_ANDROID_SDK_HOME SDK

-device
ADT 14 ADT
2
Android Android ADB
adb devices

ADT uninstallRuntime
-uninstallRuntime AIR
adt -uninstallRuntime -platform platformName -platformsdk path_to_sdk -device deviceID

-platform Android android


-platformsdk SDK Android SDK AIR 2.6 SDK

Android SDK ADT Android SDK


AIR_ANDROID_SDK_HOME SDK

-device
ADT 14 ADT

2
Android Android ADB
adb devices

ADT help
ADT -help
adt -help

help
<>
() help
ALL_CAPS
| ( A | B ) A B
? 0 1
* 0
+ 1

2011/10/13

ADOBE AIR

135

AIR Developer Tool (ADT)

ADT
ADT

ADT
ADT Java (JCA) AIR keystore keystore

keystore AIR

ADT x509v3 (RFC3280)


AIR
ADT Java Internet
ADT Internet JRE

AIR

-alias aliasName
-storetype type
-keystore path
-storepass password1
-keypass password2
-providerName className
-tsa url

-alias keystore keystore ADT

keystore
keystore Windows keystore
Java Keytool
keytool -list -storetype Windows-MY

CN=TestingCert,OU=QE,O=Adobe,C=US, PrivateKeyEntry,
Certificate fingerprint (MD5): 73:D5:21:E9:8A:28:0A:AB:FD:1D:11:EA:BB:A7:55:88

ADT
CN=TestingCert,OU=QE,O=Adobe,C=US

Mac OS X Keychain Keychain Access

-storetype keystore keystore Java keystore JKS PKCS12

Java 5.0 PKCS11 Keychain keystore Mac OS X


keychain Java 6.0 MSCAPI Windows JCA
keystore keystore JCA

Keystore

Java

JKS

Java keystore (.keystore)

1.2

PKCS12

PKCS12 .p12 .pfx

1.4

2011/10/13

ADOBE AIR

136

AIR Developer Tool (ADT)

Keystore

Java

PKCS11

1.5

KeychainStore

Mac OS X Keychain

1.5

Windows-MY
Windows-ROOT

MSCAPI

1.6

-keystore keystore
-storepass keystore ADT
-keypass AIR ADT
ADT

-keypass -storepass
Enter

-providerName keystore JCA ADT keystore

-tsa RFC3161 URL URL Geotrust


AIR

ADT -tsa none


AIR
Java Keytool Keytool Windows

keystore Mac OS X Apple

-provisioning-profile Apple iOS iOS

.p12
-storetype pkcs12 -keystore cert.p12

Java keystore
-alias AIRcert -storetype jks

Java keystore
-alias AIRcert -storetype jks -keystore certStore.keystore

Mac OS X keychain
-alias AIRcert -storetype KeychainStore -providerName Apple

Windows keystore
-alias cn=AIRCert -storeype Windows-MY

Java providerName
-alias AIRCert -storetype pkcs11 -providerName tokenProviderName

-storetype pkcs12 -keystore cert.p12 -tsa none

2011/10/13

ADOBE AIR

137

AIR Developer Tool (ADT)

files_and_dirs -C dir files_and_dirs -e file_or_dir dir -extdir dir

files_and_dirs AIR

-C
C file_or_dir ADT

ADT . -C assets

-C dir dir
C dir

ADT
-C release/bin lib/feature.swf release/bin/lib/feature.swf lib

-e file_or_dir dir ANE


<content>

-extdir dirdir ANE


-extdir
ANE ANE .ane .ane
extensionID
-extdir ./extensions extensions
extensions/
extension1.ane
extension2.ane

ADT ADL -extdir ADL

ANE ADT ANE

apk-debug
-connect -listen USB

-connect
-connect hostString

-connect
hostString Flash FDB
machinename.subgroup.example.com IP

192.168.4.122
-listen
-listen port

-listen

2011/10/13

ADOBE AIR

138

AIR Developer Tool (ADT)

port 7936 -listen 83


USB FDB

Android
apk-profile SWF

-preloadSWFPath directory

-preloadSWFPath SWF ADT AIR

SDK SWF
directory SWF

ANE -target ane ADT

extension-descriptor -swc swcPath -platform platformName FILE_OPTIONS

extension-descriptor
-swc ActionScript SWC
-platform ANE -platform FILE_OPTIONS
FILE_OPTIONS 137

ANE -e

ADT
ADT

100

XML

101

102

103

104

2011/10/13

ADOBE AIR

139

AIR Developer Tool (ADT)

105

106

transparency = true

systemChrome = standard

107

108

109

110

111

112

AIR

113

<nativeLibrary> <initializer>

supportedProfies

114

<nativeLibrary> <finalizer>

115

116

<allowBrowserInvocation> true

117

AIR

154 AIR

200

201

XML

<image32x32>icon.png</image32x32>
icon.png 32x32

202

PNG

300

301

302

<content>
SWF HTML
ADT

2011/10/13

ADOBE AIR

140

AIR Developer Tool (ADT)

303

ADT

304

<content>

HTML SWF

305

SWF

AIR
<content>

SWF SWF10 (Flash


Player 10) AIR 1.1

306

180

supportedProfiles
307

nnn

2.0

ADT Java
ADT JRE
ADT

Java 1.6 Keytool

AIR

ADT

10

ADT
Internet
JRE

11

12

ADT

13

SDK

SDK ADT
SDK

14

ADT

2011/10/13

ADOBE AIR

141

AIR Developer Tool (ADT)

15

16

GPL

AIR SDK

17

Android

400

Android sdk

Android 2.2
ADT -platformsdk

401

Android sdk

Android 2.2
ADT -platformsdk
402

Android sdk XML

XML
Android
Android 2.2
ADT -platformsdk

403

Android

AIR
Android 64
Android

404

Android

AIR

Android 64
Android
405

Android %1
manifestAdditions

406

Android %2 %1
%3

ADT
ADT
AIR_ANDROID_SDK_HOME Android SDK tools AIR 2.6 SDK
Android SDK ADT Android SDK ADT
-platformsdk ADT

2011/10/13

ADOBE AIR

142

AIR Developer Tool (ADT)

AIR_EXTENSION_PATH ADT
ADL
ADT

JRE UTF-8 Mac Linux ADT Windows adt.bat


Java ADT Java -Dfile.encoding=UTF-8

2011/10/13

143

13 : AIR
AIR
(CA) AIR

AIR AIR

keystore AIR

(CPS)
AIR

ChosenSecurity (http://www.chosensecurity.com/products/tc_publisher_id_adobe_air.htm)

2011/10/13

ADOBE AIR

144

AIR

ChosenSecurity CPS (http://www.chosensecurity.com/resource_center/repository.htm)


GlobalSign (http://www.globalsign.com/code-signing/index.html)
GlobalSign CPS (http://www.globalsign.com/repository/index.htm)
Thawte CPS (http://www.thawte.com/cps/index.html)
VeriSign CPS (http://www.verisign.com/repository/CPS/)
VeriSign Subscriber's Agreement (https://www.verisign.com/repository/subscriber/SUBAGR.html)

AIR
AIR AIR

AIR (PKI) AIR


AIR
AIR
AIR AIR
AIR

AIR

AIR
AIR 1.5.3 ID ID

ID ID
AIR 1.5.3 AIR AIR ID AIR
AIR ID
ID
AIR 1.5.3 ID AIR AIR 1.5.3
ID AIR 1.5.3 ID
ID AIR
ID META-INF/AIR publisherid
ID ID AIR 1.5.3

ID




AIR API
OSID /
ID ID AIR
Flash AIR ID AIR 1.5.3
ID AIR ID

2011/10/13

ADOBE AIR

145

AIR

AIR Java (JCA) Keystore Keystore PKCS12


.pfx .p12 Java .keystore PKCS11 Keystore KeystoreADT
Keystore ADT Java Keystore PKCS11
JCA
AIR AIR
VeriSign Thawte GlobalSign ChosenSecurity

ChosenSecurity
Adobe AIR TC Publisher ID
GlobalSign
ObjectSign
Thawte
AIR (AIR Developer Certificate)
Apple (Apple Developer Certificate)
JavaSoft (JavaSoft Developer Certificate)
Microsoft (Microsoft Authenticode Certificate)
VeriSign
Adobe AIR ID
Microsoft ID (Microsoft Authenticode Digital ID)
Sun Java ID (Sun Java Signing Digital ID)
SSL AIR

AIR

AIR AIR
AIR
AIR Adobe
AIR

AIR Geotrust

AIR Keystore

Thawte Adobe Developer Mozilla Firefox Firefox .p12


.pfx
Java 1.5 PKCS12 ASCII Java AIR

AIR .p12 .pfx ASCII


Air Air (ADT)
AIR 125 AIR Developer Tool (ADT)
Flash Builder Dreamweaver AIR update for Flash AIR

2011/10/13

ADOBE AIR

146

AIR

Thawte AIR ADT

Thawte AIR

AIR Thawte Mozilla Firefox Keystore


Firefox Keystore Keystore

/ Firefox Keystore Thawte

1 Thawte
2 Code Signing Certificates Adobe AIR Developer Certificate
3 Thawte
Thawte
https://www.thawte.com/ssl-digital-certificates/free-guides-

whitepapers/pdf/enroll_codesign_eng.pdf
4 Thawte Firefox Keystore
5 Firefox Keystore Keystore
Firefox / ADT Flex Flash Dreamweaver .p12 (pfx)

a Firefox (Certificate Manager)


b Windows (Tools) -> (Options) -> (Advanced) -> (Encryption) ->

(View Certificates)
c Mac OS Firefox-> (Preferences) -> (Advanced) -> (Encryption) ->

(View Certificates)
d Linux (Edit) -> (Preferences) -> (Advanced) -> (Encryption) ->
(View Certificates)

e Adobe AIR (Adobe AIR Code Signing Certificate) (Backup)

Keystore (Save)

g Firefox Firefox
h (Choose a Certificate Backup Password) Keystore
Keystore AIR

Keystore .p12
PKCS12

6 ADTFlash BuilderFlash Professional Dreamweaver keystore AIR

Firefox Keystore

2011/10/13

ADOBE AIR

147

AIR

AIR





AIR AIR AIR AIR
AIR

AIR

AIR 1.5.3 180

1
2 AIR
3 AIR ADT -migrate
AIR AIR AIR

AIR 1.5.3 AIR AIR 1.5.3

130 ADT migrate

AIR 1.5.3 AIR


ID

ID

OSID / OSID
AIR 1.5.3 AIR ID

AIR 1.5.3 AIR ID

2011/10/13

ADOBE AIR

148

AIR

(CA)

CA

(CPS)

CPS CA

(CRL)

AIR AIR CRL

CA

- PKI

Keystore

Java (JCA)

Keystore Java

PKCS #11

RSA Laboratories Keystore

PKCS #12

RSA Laboratories Keystore

(PKI)

CA

ADT RFC 3161


AIR AIR AIR

AIR RFC 3161

iOS
Apple iOS Adobe AIR
Apple
ADT
.p12 .pfx keystore 149 P12
keystore

Apple iOS Provisioning Portal

Apple Apple World Wide Developer Relations

2011/10/13

ADOBE AIR

149

AIR

Mac OS
Mac OS
Apple iOS Provisioning Portal
Windows
Windows Mac iPhone Windows
OpenSSL CSR

1 OpenSSL Windows http://www.openssl.org/related/binaries.html


Open SSL Visual C++ 2008 Redistributable

Visual C++
2 Windows CD OpenSSL bin c:\OpenSSL\bin\
3
openssl genrsa -out mykey.key 2048

OpenSSL OpenSSL

4 CSR
openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest
"/emailAddress=yourAddress@example.com, CN=John Doe, C=US"

-subj

CN C /

5 CSR Apple iPhone iPhone

P12 keystore
P12 keystore Apple keystore

Mac OS iPhone P12


Apple Apple iPhone P12 keystore Mac OS

1 /
2 > Apple .cer
3
4 iPhone
iPhone < >< >

5 Command iPhone Export iPhone Developer: Name...


6 (.p12) keystore
7 keystore keystore

keystore
Windows Apple P12
AIR for iOS P12 Apple Apple iPhone

1 Apple PEM OpenSSL bin


2011/10/13

ADOBE AIR

150

AIR

openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM

2 Mac PEM
openssl pkcs12 -nocerts -in mykey.p12 -out mykey.pem

3 PEM iPhone P12


openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12

Mac OS PEM OpenSSL


Windows

ADT AIR
-prepare AIR ADT -sign AIR AIR

-prepare -package
airi
AIR ADT -sign 130 ADT prepare

ADT -prepare
adt -prepare unsignedMyApp.airi myApp.xml myApp.swf components.swc

ADT AIR
ADT AIR -sign sign AIR airi AIR

AIR adt -prepare 130 ADT prepare


AIRI

ADT -sign
adt -sign SIGNING_OPTIONS airi_file air_file

SIGNING_OPTIONS AIR 135 ADT

airi_file AIR
air_file AIR

ADT -sign
adt -sign -storetype pkcs12 -keystore cert.p12 unsignedMyApp.airi myApp.air

130 ADT sign

2011/10/13

ADOBE AIR

151

AIR

AIR
AIR ADT -migrate

AIR

180

180
180 AIR 1.5.3

URL
URL
198

/ ID

Adobe AIR

1.5.3

C1

AIR

AIR
AIR

AIR

AIR

180

1.5.2

ID

C1

Adobe AIR

C1

AIR

AIR
AIR

AIR

AIR

AIR

AIR

2011/10/13

ADOBE AIR

152

AIR

1.0
C1
AIR 1.5.3

PUB ID

AIR 1.5.3

1.0

C1

2.0

C2

180

C2
adt -migrate
C1

1.0
C1
2.0
C2

1
2 AIR
3 -migrate AIR
-migrate AIR
AIR 1.5.3 ID

AIR

ADT -migrate
adt -migrate SIGNING_OPTIONS air_file_in air_file_out

SIGNING_OPTIONS AIR 135

ADT
air_file_in AIR
air_file_out AIR
AIR

ADT
adt -migrate -storetype pkcs12 -keystore cert.p12 myAppIn.air myApp.air

130 ADT sign


AIR 1.1 -migrate ADT

2011/10/13

ADOBE AIR

153

AIR

ADT
AIR
AIR ADT
AIR AIR
ADT ADT
ADT AIR

Adobe AIR

ADT PKCS12 keystore keystore

adt -certificate -cn SelfSign -ou QE -o "Example, Co" -c US 2048-RSA newcert.p12 39#wnetx3tl
adt -certificate -cn ADigitalID 1024-RSA SigningCert.p12 39#wnetx3tl

AIR ADT -package -prepare


-storetype pkcs12 -keystore newcert.p12 -keypass 39#wnetx3tl
-storetype pkcs12 -keystore SigningCert.p12 -keypass 39#wnetx3tl

Java 1.5 PKCS12 ASCII

ASCII

2011/10/13

154

14 : AIR
AIR XML
AIR
descriptor-sample.xml AIR Flex SDK samples
application.xml

AIR

AIR
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/3.0">
<id>example.HelloWorld</id>
<versionNumber>1.0.1</versionNumber>
<filename>Hello World</filename>
<name>Example Co. AIR Hello World</name>
<description>
<text xml:lang="en">This is an example.</text>
<text xml:lang="fr">C'est un exemple.</text>
<text xml:lang="es">Esto es un ejemplo.</text>
</description>
<copyright>Copyright (c) 2010 Example Co.</copyright>
<initialWindow>
<title>Hello World</title>
<content>
HelloWorld.swf
</content>
</initialWindow>
<icon>
<image16x16>icons/smallIcon.png</image16x16>
<image32x32>icons/mediumIcon.png</image32x32>
<image48x48>icons/bigIcon.png</image48x48>
<image128x128>icons/biggerIcon.png</image128x128>
</icon>
</application>

HTML SWF <content>


<content>
HelloWorld.html
</content>

AIR AIR

AIR 1.1
name description text

2011/10/13

ADOBE AIR

155

AIR

AIR 1.5
contentType fileType

AIR 1.5.3
publisherID ID

AIR 2.0

aspectRatio
autoOrients
fullScreen
image29x29
image57x57
image72x72
image512x512
iPhone
renderMode
supportedProfiles

AIR 2.5
version

android
extensionID
extensions
image36x36
manifestAdditions
versionLabel
versionNumber

AIR 2.6

image114x114
requestedDisplayResolution
softKeyboardBehavior

2011/10/13

ADOBE AIR

156

AIR

AIR 3.0

colorDepth
direct renderMode

XML
<application xmlns="http://ns.adobe.com/air/application/3.0">
<allowBrowserInvocation>...<allowBrowserInvocation>
<android>
<colorDepth>...</colorDepth>
<manifestAdditions
<manifest>...</manifest>
]]>
</manifestAdditions
</android>
<copyright>...</copyright>
customUpdateUI>...</
<description>
<text xml:lang="...">...</text>
</description>
<extensions>
<extensionID>...</extensionID>
</extensions>
<filename>...</filename>
<fileTypes>
<fileType>
<contentType>...</contentType>
<description>...</description>
<extension>...</extension>
<icon>
<imageNxN>...</imageNxN>
</icon>
<name>...</name>
</fileType>
</fileTypes>
<icon>
<imageNxN>...</imageNxN>
</icon>
<id>...</id>
<initialWindow>
<aspectRatio>...</aspectRatio>
<autoOrients>...</autoOrients>
<content>...</content>
<fullScreen>...</fullScreen>
<height>...</height>
<maximizable>...</maximizable>
<maxSize>...</maxSize>
<minimizable>...</minimizable>
<minSize>...</minSize>
<renderMode>...</renderMode>
<resizable>...</resizable>
<systemChrome>...</systemChrome>
<title>...</title>
<transparent>...</transparent>

2011/10/13

ADOBE AIR

157

AIR

<visible>...</visible>
<width>...</width>
<x>...</x>
<y>...</y>
</initialWindow>
<installFolder>...</installFolder>
<iPhone>
<InfoAdditions>...</InfoAdditions>
<requestedDisplayResolution>...</requestedDisplayResolution>
</iPhone>
<name>
<text xml:lang="...">...</text>
</name>
<programMenuFolder>...</programMenuFolder>
<publisherID>...</publisherID>
<softKeyboardBehavior>...</softKeyboardBehavior>
<supportedProfiles>...</supportedProfiles>
<versionNumber>...</versionNumber>
<versionLabel>...</versionLabel>
</application>

AIR
AIR

allowBrowserInvocation
Adobe AIR 1.0
AIR API
true AIR ActionScript

AIR HTML
195 AIR
158 application

true false

<allowBrowserInvocation>true </allowBrowserInvocation>

android
Adobe AIR 2.5
Android AIR APK AndroidManifest.xml AIR
android Android
158 application

2011/10/13

ADOBE AIR

158

AIR

161 colorDepth
174 manifestAdditions

Android Android

<android>
<manifestAdditions>
...
</manifestAdditions>
</android>

64 Android

AndroidManifest.xml

application
Adobe AIR 1.0
AIR

157 allowBrowserInvocation
157 android
163 copyright
163 customUpdateUI
163 description
165 extensions
165 filename
167 fileTypes
168 icon
169 id
171 initialWindow
172 installFolder
173 iPhone
176 name
177 programMenuFolder
178 publisherID
179 softKeyboardBehavior

2011/10/13

ADOBE AIR

159

AIR

180 supportedProfiles
182 version
183 versionLabel
183 versionNumber

minimumPatchLevel AIR
xmlns XML AIR
AIR 2.7,

AIR xmlns
xmlns="http://ns.adobe.com/air/application/1.0"
xmlns="http://ns.adobe.com/air/application/1.1"
xmlns="http://ns.adobe.com/air/application/1.5"
xmlns="http://ns.adobe.com/air/application/1.5.2"
xmlns="http://ns.adobe.com/air/application/1.5.3"
xmlns="http://ns.adobe.com/air/application/2.0"
xmlns="http://ns.adobe.com/air/application/2.5"
xmlns="http://ns.adobe.com/air/application/2.6"
xmlns="http://ns.adobe.com/air/application/2.7"

SWF AIR SWF


AIR 1.0 AIR 1.1 SWF9 (Flash Player 9)
AIR 2 AIR 1.5 SWF9 SWF10 (Flash Player 10)

SWF AIR Flash Player API SWF9 AIR 1.5


AIR 1.1 Flash Player 9 APIAIR 2.0 Flash Player 10.1 API
API
HTML AIR Flash Player API
HTML CSS JavaScript AIR Webkit

AIR SWF AIR Flash Player API

API

API

, SWF

SWF

, HTML

SWF SWF

HTML <script> SWF

HTML AIR Flash Player API

flash.display.Loader SWF
HTML <object> <embed>

SWF

JavaScript API SWF

2011/10/13

ADOBE AIR

160

AIR

SWF

SWF SWF AIR Flash Player API

SWF SWF AIR Flash Player API

AIR

<?xml version="1.0" encoding="utf-8" ?>


<application xmlns="http://ns.adobe.com/air/application/2.7">
<id>HelloWorld</id>
<version>2.0</version>
<filename>Hello World</filename>
<name>Example Co. AIR Hello World</name>
<description>
<text xml:lang="en">This is an example.</text>
<text xml:lang="fr">C'est un exemple.</text>
<text xml:lang="es">Esto es un ejemplo.</text>
</description>
<copyright>Copyright (c) 2010 Example Co.</copyright>
<initialWindow>
<title>Hello World</title>
<content>
HelloWorld.swf
</content>
<systemChrome>none</systemChrome>
<transparent>true</transparent>
<visible>true</visible>
<minSize>320 240</minSize>
</initialWindow>
<installFolder>Example Co/Hello World</installFolder>
<programMenuFolder>Example Co</programMenuFolder>
<icon>
<image16x16>icons/smallIcon.png</image16x16>
<image32x32>icons/mediumIcon.png</image32x32>
<image48x48>icons/bigIcon.png</image48x48>
<image128x128>icons/biggestIcon.png</image128x128>
</icon>
<customUpdateUI>true</customUpdateUI>
<allowBrowserInvocation>false</allowBrowserInvocation>
<fileTypes>
<fileType>
<name>adobe.VideoFile</name>
<extension>avf</extension>
<description>Adobe Video File</description>
<contentType>application/vnd.adobe.video-file</contentType>
<icon>
<image16x16>icons/avfIcon_16.png</image16x16>
<image32x32>icons/avfIcon_32.png</image32x32>
<image48x48>icons/avfIcon_48.png</image48x48>
<image128x128>icons/avfIcon_128.png</image128x128>
</icon>
</fileType>
</fileTypes>
</application>

2011/10/13

ADOBE AIR

161

AIR

aspectRatio
Adobe AIR 2.0 iPhone Android
.

iPad
171 initialWindow

portrait landscape

<aspectRatio> landscape</aspectRatio>

autoOrients
Adobe AIR 2.0 iPhone Android

align scaleMode
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

171 initialWindow

true false

<autoOrients>true </autoOrients>

colorDepth
Adobe AIR 3
16 32
16 AIR 3 Android 16 AIR 3
32
StageVideo 32
157 android

2011/10/13

ADOBE AIR

162

AIR

16
32

<android>
<colorDepth>16bit</colorDepth>
<manifestAdditions>...</manifestAdditions>
</android>

content
Adobe AIR 1.0
content URL SWF HTML URL
ADL AIR URL
ADL root-dir
171 initialWindow

URL content URL RFC 1738


URL %20

<content>TravelPlanner.swf </content>

contentType
Adobe AIR 1.0 1.1 AIR 1.5
contentType AIR 1.5 AIR 1.0 1.1
MIME MIME
Linux
166 fileType

MIME MIME RFC2045

<contentType> text/plain</contentType>

2011/10/13

ADOBE AIR

163

AIR

copyright
Adobe AIR 1.0
AIR Mac OS Mac OS
Info.plist NSHumanReadableCopyright
158 application

<copyright> 2010, Examples, Inc.All rights reserved. </copyright>

customUpdateUI
Adobe AIR 1.0
false AIR AIR
AIR
customUpdateUI true AIR
AIR
AIR ID ID

AIR

customUpdateUI customUpdateUI true


UI
197 AIR
158 application

true false

<customUpdateUI> true</customUpdateUI>

description
Adobe AIR 1.0
AIR
AIR

AIR
description en en AIR
en en-US en

2011/10/13

ADOBE AIR

164

AIR

en-US en-US en-GB AIR


en-US AIR
description
228 AIR
158 application
181 text

AIR 1.0 text


AIR 1.1 description xml:lang
RFC4646 (http://www.ietf.org/rfc/rfc4646.txt)

<description>This is a sample AIR application.</description>

AIR 1.1
<description>
<text xml:lang="en">This is an example.</text>
<text xml:lang="fr">C'est un exemple.</text>
<text xml:lang="es">Esto es un ejemplo.</text>
</description>

description
Adobe AIR 1.0

163 description application


166 fileType

<description> PNG image</description>

extension
Adobe AIR 1.0

166 fileType

2011/10/13

ADOBE AIR

165

AIR

<extension> png</extension>

extensionID
Adobe AIR 2.5 tv extendedTV
ActionScript ID ID
165 extensions

ActionScript ID

<extensionID> com.example.extendedFeature</extensionID>

extensions
Adobe AIR 2.5 tv extendedTV
ActionScript
158 application
165 extensionID

extensionID ActionScript ID

<extensions>
<extensionID>extension.first</extensionID>
<extensionID>extension.next</extensionID>
<extensionID>extension.last</extensionID>
</extensions>

filename
Adobe AIR 1.0
AIR
name filename
158 application

2011/10/13

ADOBE AIR

166

AIR

filename Unicode (UTF-8)

0x00 - x1F

x2A

"

x22

x3A

>

x3C

<

x3E

x3F

x5C

x7C

filename

<filename> MyApplication</filename>

fileType
Adobe AIR 1.0

167 fileTypes

162 contentType
164 description
164 extension
168 icon
177 name

2011/10/13

ADOBE AIR

167

AIR

<fileType>
<name>foo.example</name>
<extension>foo</extension>
<description>Example file type</description>
<contentType>text/plain</contentType>
<icon>
<image16x16>icons/fooIcon16.png</image16x16>
<image48x48>icons/fooIcon48.png</imge48x48>
<icon>
</fileType>

fileTypes
Adobe AIR 1.0
fileTypes AIR
AIR
AIR
NativeApplication.setAsDefaultApplication()

fileTypes
158 application
166 fileType

fileTypes fileType

<fileTypes>
<fileType>
<name>adobe.VideoFile</name>
<extension>avf</extension>
<description>Adobe Video File</description>
<contentType>application/vnd.adobe.video-file</contentType>
<icon>
<image16x16>icons/AIRApp_16.png</image16x16>
<image32x32>icons/AIRApp_32.png</image32x32>
<image48x48>icons/AIRApp_48.png</image48x48>
<image128x128>icons/AIRApp_128.png</image128x128>
</icon>
</fileType>
</fileTypes>

fullScreen
Adobe AIR 2.0 iPhone Android

171 initialWindow

2011/10/13

ADOBE AIR

168

AIR

true false

<fullscreen>true </fullscreen>

height
Adobe AIR 1.0

SWF HTML AIR

AIR 2 2048 4096


171 initialWindow

4095

<height>4095 </height>

icon
Adobe AIR 1.0
icon icon

PNG

AIR

16 32
158 application
169 imageNxN

imageNxN

2011/10/13

ADOBE AIR

169

AIR

<icon>
<image16x16>icons/smallIcon.png</image16x16>
<image32x32>icons/mediumIcon.png</image32x32>
<image48x48>icons/bigIcon.png</image48x48>
<image128x128>icons/biggestIcon.png</image128x128>
</icon>

id
Adobe AIR 1.0
ID DNS
158 application

ID

0-9
a-z
A-Z
.
-
1 212

<id>org.example.application</id>

imageNxN
Adobe AIR 1.0

image16x16
image29x29 (AIR 2+)
image32x32
image36x36 (AIR 2.5+)
image48x48
image57x57 (AIR 2+)
image72x72 (AIR 2+)
image114x114 (AIR 2.6+)
image128x128
image512x512 (AIR 2+)
2011/10/13

ADOBE AIR

170

AIR

PNG

158 application

Unicode (UTF-8)

0x00 - x1F

x2A

"

x22

x3A

>

x3C

<

x3E

x3F

x5C

x7C

<image32x32>icons/icon32.png</image32x32>

InfoAdditions
Adobe AIR 1.0
iPhone
173 iPhone
iPhone Info.plist elements

Info.plist InfoAdditions CDATA


XML Apple iPhone

<InfoAdditions>
<![CDATA[
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UIRequiresPersistentWiFi</key>
<string>NO</string>
]]>
</InfoAdditions>

2011/10/13

ADOBE AIR

171

AIR

69 iOS

initialWindow
Adobe AIR 1.0

158 application
initialWindow AIR windows

Adobe Flash Platform

TV

161

161
autoOrients

162
content

167
fullScreen

168
height

175
maximizable

175
maxSize

176
minimizable

176
minSize

178
renderMode

179
resizable

179
softKeyboard
Behavior

181
systemChrom
e

182
title

aspectRatio

2011/10/13

ADOBE AIR

172

AIR

Adobe Flash Platform

TV

182

183
visible

184
width

184 x

185 y

transparent

<initialWindow>
<title>Hello World</title>
<content>
HelloWorld.swf
</content>
<systemChrome>none</systemChrome>
<transparent>true</transparent>
<visible>true</visible>
<maxSize>1024 800</maxSize>
<minSize>320 240</minSize>
<maximizable>false</maximizable>
<minimizable>false</minimizable>
<resizable>true</resizable>
<x>20</x>
<y>20</y>
<height>600</height>
<width>800</width>
<aspectRatio>landscape</aspectRatio>
<autoOrients>true</autoOrients>
<fullScreen>false</fullScreen>
<renderMode>auto</renderMode>
</initialWindow>

installFolder
Adobe AIR 1.0

Windows Program Files Mac OS /Applications Linux


/opt/ installFolder "Acme" "ExampleApp" Windows
C:\Program Files\Acme\ExampleApp MacOS /Applications/Acme/Example.app
Linux /opt/Acme/ExampleApp

installFolder installFolder name


158 application

2011/10/13

ADOBE AIR

173

AIR

installFolder Unicode (UTF-8)


filename
(/)

<installFolder>utilities/toolA</installFolder>

iPhone
Adobe AIR 2.0 iPhone
iPhone
158 application

170 InfoAdditions
179 requestedDisplayResolution

69 iOS

manifest
Adobe AIR 2.5 Android
Android
174 manifestAdditions
Android SDK

manifest AIR Android XML

manifest AndroidManifest.xml AIR APK manifest


AndroidManifest.xml
manifest AIR CDATA

<![CDATA[
<manifest android:sharedUserID="1001">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:required="false" android:name="android.hardware.camera"/>
<application android:allowClearUserData="true"
android:enabled="true"
android:persistent="true"/>
</manifest>
]]>

2011/10/13

ADOBE AIR

174

AIR

64 Android

AndroidManifest.xml

manifestAdditions
Adobe AIR 2.5 Android
Android
Android Android AIR

AIR for Android Android AIR for Android


manifestAdditions Android
157 android
173 manifest

manifestAdditions AndroidManifest XML

AIR Android
manifest

package
android:versionCode
android:versionName
activity

android:label
android:icon
application

android:theme
android:name
android:label
android:windowSoftInputMode
android:configChanges
android:screenOrientation
android:launchMode

2011/10/13

ADOBE AIR

175

AIR

<manifestAdditions>
<![CDATA[
<manifest android:installLocation="preferExternal">
<uses-permission android:name="android.permission.INTERNET"/>
<application android:allowClearUserData="true"
android:enabled="true"
android:persistent="true"/>
</manifest>
]]>
</manifestAdditions>

64 Android

AndroidManifest.xml

maximizable
Adobe AIR 1.0

Mac OS X maximizable
resizable false
171 initialWindow

true false

<maximizable>false </maximizable>

maxSize
Adobe AIR 1.0

171 initialWindow

AIR AIR 2 2048x2048 4096x4096

4095

<maxSize>1024 360</maxSize>

2011/10/13

ADOBE AIR

176

AIR

minimizable
Adobe AIR 1.0

171 initialWindow

true false

<minimizable>false</minimizable>

minSize
Adobe AIR 1.0

171 initialWindow

<minSize>120 60</minSize>

name
Adobe AIR 1.0
AIR
name AIR filename
158 application
181 text

<text> AIR

AIR 1.0 text AIR 1.1


name
xml:lang RFC4646 (http://www.ietf.org/rfc/rfc4646.txt)

AIR
name en en AIR
en en-US en

2011/10/13

ADOBE AIR

177

AIR

en-US en-US en-GB AIR en-

US AIR
name

name AIR AIR

AIR

name 228
AIR

<name>Test Application</name>

AIR 1.1 <text>


<name>
<text xml:lang="en">Hello AIR</text>
<text xml:lang="fr">Bonjour AIR</text>
<text xml:lang="es">Hola AIR</text>
</name>

name
Adobe AIR 1.0

166 fileType

<name>adobe.VideoFile</name>

programMenuFolder
Adobe AIR 1.0
Windows Linux

158 application

programMenuFolder Unicode (UTF-8)


filename (/)

2011/10/13

ADOBE AIR

178

AIR

<programMenuFolder>Example Company/Sample Application</programMenuFolder>

publisherID
Adobe AIR 1.5.3
AIR 1.5.2 AIR ID
ID publisherID AIR ID
ID META-INF/AIR/publisherid
AIR 1.5.3 ID
144 AIR
158 application

ID

<publisherID>B146A943FBD637B68C334022D304CEA226D129B4.1</publisherID>

renderMode
Adobe AIR 2.0
(GPU)
171 initialWindow

auto CPU
cpu
direct CPU GPU AIR 3+
gpu
Flex GPU

<renderMode>direct</renderMode>

2011/10/13

ADOBE AIR

179

AIR

requestedDisplayResolution
Adobe AIR 2.6 iOS
iOS standard
320x480 640x960
high 640x960

173 iPhone

standard high

<requestedDisplayResolution>high</requestedDisplayResolution>

resizable
Adobe AIR 1.0

Mac OS X maximizable

resizable false
171 initialWindow

true false

<resizable>false</resizable>

softKeyboardBehavior
Adobe AIR 2.6

pan
softKeyboardBehavior none
SoftKeyboardEvent

158 application

2011/10/13

ADOBE AIR

180

AIR

none pan pan

<softKeyboardBehavior>none</softKeyboardBehavior>

SoftKeyboardEvent

supportedProfiles
Adobe AIR 2.0

158 application

supportedProfiles
desktop desktop AIR desktop AIR

NativeProcess
extendedDesktop AIR
NativeProcess

mobileDevice
extendedMobileDevice
tv tv AIR
extendedTV extendedTV AIRN

ActionScript
supportedProfiles

<supportedProfiles>desktop extendedDesktop</supportedProfiles>

ADL ADL -profile

<supportedProfiles>desktop mobileDevice</supportedProfiles>

186
63

2011/10/13

ADOBE AIR

181

AIR

systemChrome
Adobe AIR 1.0

171 initialWindow

none Flex
standard

<systemChrome>standard</systemChrome>

text
Adobe AIR 1.1

xml:lang RFC4646 (http://www.ietf.org/rfc/rfc4646.txt)

AIR xml:lang text


text en en
AIR en en-US

en en-US en-US en-GB AIR


en-US
text AIR
name

176 name
163 description

xml:lang

<text xml:lang="fr">Bonjour AIR</text>

2011/10/13

ADOBE AIR

182

AIR

title
Adobe AIR 1.0

systemChrome standard
171 initialWindow

<title>Example Window Title</title>

transparent
Adobe AIR 1.0
alpha

systemChrome none transparent true


171 initialWindow

true false

<transparent>true</transparent>

version
Adobe AIR 1.0 2.0 AIR 2.5

version AIR 3.0 2.0


1.0 .4 0.5 4.9 1.3.4a
AIR 2.5 versionNumber versionLabel version
158 application

2011/10/13

ADOBE AIR

183

AIR

<version>0.1 Alpha</version>

versionLabel
Adobe AIR 2.5

versionNumber versionLabel

versionNumber
158 application

<versionLabel>0.9 Beta</versionlabel>

versionNumber
Adobe AIR 2.5

158 application

0 999

<versionNumber>1.0.657</versionNumber>
<versionNumber>10</versionNumber>
<versionNumber>0.01</versionNumber>

visible
Adobe AIR 1.0

AIR activate() visible


true

MXML visible false Flex mx:WindowedApplication


applicationComplete

2011/10/13

ADOBE AIR

184

AIR

tv
171 initialWindow

true false

<visible>true</visible>

width
Adobe AIR 1.0

SWF HTML AIR

AIR 2 2048 4096


171 initialWindow

4095

<width>1024</width>

x
Adobe AIR 1.0

(0,0)
171 initialWindow

<x>120</x>

2011/10/13

ADOBE AIR

185

AIR

y
Adobe AIR 1.0

(0,0)
171 initialWindow

<y>250</y>

2011/10/13

186

15 :
Adobe AIR 2
API


extendedDesktop
mobileDevice
extendedMobileDevice
tv
extendedTV

AIR

extendedDesktop
AIR mobileDevice

Android APK
AIR extendedDesktop
exe dmg deb

rpm AIR


Accelerometer.isSupported

supportedProfiles AIR
AIR AIR

Mac OSWindows Linux AIR 2 AIR AIR


API
AIR

Windows EXE Mac OS DMG Linux BINDEB RPM


49

Android Blackberry Tablet OS iOS


TV
Adobe AIR

2011/10/13

ADOBE AIR

187

Adobe AIR

Adobe AIR 2
AIR 2 supportedProfiles

<supportedProfiles>desktop</supportedProfiles>

desktop
extendedDesktop
mobileDevice
tv -
extendedTV -
supportedProfiles
supportedProfiles
<supportedProfiles>desktop extendedDesktop</supportedProfiles>

Adobe AIR 2

extendedDeskt mobileDevice
op

tv

extendedTV

Accelerometer (Accelerometer.isSupported)

Accessibility (Capabilities.hasAccessibility)

ActionScript 2

CacheAsBitmap

Camera (Camera.isSupported)

CameraRoll

CameraUI (CameraUI.isSupported)

ContextMenu (ContextMenu.isSupported)

(Microphone.getEnhancedMicrophone())

2011/10/13

ADOBE AIR

188

extendedDeskt mobileDevice
op

tv

extendedTV

DatagramSocket
(DatagramSocket.isSupported)

DockIcon
(NativeApplication.supportsDockIcon)

(NativeDragManager.isSupported)

EncyptedLocalStore
(EncyptedLocalStore.isSupported)

Flash Access (DRMManager.isSupported)

GameInput (GameInput.isSupported)

Geolocation (Geolocation.isSupported)

HTMLLoader (HTMLLoader.isSupported)

IME (IME.isSupported)

LocalConnection
(LocalConnection.isSupported)

Microphone (Microphone.isSupported)

NativeMenu (NativeMenu.isSupported)

NativeProcess (NativeProcess.isSupported)

NativeWindow
(NativeWindow.isSupported)

NetworkInfo (NetworkInfo.isSupported)

PrintJob (PrintJob.isSupported)

SecureSocket (SecureSocket.isSupported)

ServerSocket (ServerSocket.isSupported)

Shader

Stage3D (Stage.stage3Ds.length)

StageVideo

StageWebView
(StageWebView.isSupported)

(Capabilities.hasMultiChannelAudio())

(Stage.supportsOrientationChange)

(NativeApplication.supportsStartAtLogin)

2011/10/13

ADOBE AIR

189

extendedDeskt mobileDevice
op

tv

extendedTV

StorageVolumeInfo
(StorageVolumeInfo.isSupported)

SystemTrayIcon
(NativeApplication.supportsSystemTrayIco
n)

Text Layout Framework

Updater (Updater.isSupported)

XMLSignatureValidator
(XMLSignatureValidator.isSupported)

ADL
Adobe AIR 2
ADL supportedProfiles
ADL
-profile ADL 121 AIR Debug Launcher (ADL)
supportedProfiles
supportedProfiles ADL

2011/10/13

190

16 : AIR.SWF API
badge.swf
SDK badge.swf SWF SWF

AIR 194 AIR


AIR 194 AIR
193
AIR 195 AIR
adobe.com SWF air.swf API badge.swf
SWF air.swf API
SWF LocalConnection AIR
Flash Player AIR ActionScript Flash Player AIR
HTML
air.swf API Windows Mac OS Web
Adobe Flash Player 9 3 Linux Flash Player 1010.0.12.36
Flash Player Flash Player
Flash Player AIR badge.swf air.swf API

badge.swf AIR
AIR SDK Flex SDK badge.swf badge.swf
AIR badge.swf
badge.swf

1 AIR SDK Flex SDK samples/badge Web

badge.swf
default_badge.html
AC_RunActiveContent.js
2 default_badge.html
3 default_badge.html AC_FL_RunContent() JavaScript FlashVars

appname

SWF

appurl

AIR URL URL

airversion

1.0 1.0

2011/10/13

ADOBE AIR

191

AIR.SWF API

imageurl

URL

buttoncolor

FFCC00

messagecolor

FFCC00

4 badge.swf 217 x 180 AC_FL_RunContent() width height

5 default_badge.html HTML
badge.swf HTML embed wmode ("window") wmode

wmode Error #2044: Unhandled


ErrorEvent:.text=Error #2074: The stage is too small to fit the download ui.
badge.swf 192 badge.swf

AIR
SWF AIR

1 Flash Player Windows Mac OS 9 3 Linux 10 Web


HTML

2 badge.swf

2 Adobe AIR

3
Windows AIR

c:\Program Files\


/
Mac Applications Mac

/Applications
Linux AIR

/opt



4
5

2011/10/13

ADOBE AIR

192

AIR.SWF API

badge.swf
Flex SDK AIR SDK badge.swf SDK samples/badge

badge.fla

badge.swf Flash badge.fla SWF 9 Flash Player

AIRBadge.as

basdge.fla ActionScript 3.0

Flash Professional badge.fla

AIRBadge() AIRBadge http://airdownload.adobe.com/air/browserapi/air.swf


air.swf air.swf
air.swf onInit() AIRBadge
private function onInit(e:Event):void {
_air = e.target.content;
switch (_air.getStatus()) {
case "installed" :
root.statusMessage.text = "";
break;
case "available" :
if (_appName && _appName.length > 0) {
root.statusMessage.htmlText = "<p align='center'><font color='#"
+ _messageColor + "'>In order to run " + _appName +
", this installer will also set up Adobe AIR.</font></p>";
} else {
root.statusMessage.htmlText = "<p align='center'><font color='#"
+ _messageColor + "'>In order to run this application, "
+ "this installer will also set up Adobe AIR.</font></p>";
}
break;
case "unavailable" :
root.statusMessage.htmlText = "<p align='center'><font color='#"
+ _messageColor
+ "'>Adobe AIR is not available for your system.</font></p>";
root.buttonBg_mc.enabled = false;
break;
}
}

_air air.swf badge.swf

getStatus()

193

runtimeVersion - "1.0.M6"
installApplication()

194 AIR

url - URL URL


runtimeVersion "2.5"
arguments -
allowBrowserInvocation true
154 AIR
NativeApplication BrowserInvokeEvent
195 AIR

2011/10/13

ADOBE AIR

193

AIR.SWF API

url runtimeVersion HTML FlashVars SWF


LocalConnection badge.swf
Flash Player AIR ActionScript Flash Player AIR
HTML
air.swf getApplicationVersion()
194 AIR

air.swf
SWF air.swf API AIR air.swf
http://airdownload.adobe.com/air/browserapi/air.swf SWF air.swf API air.swf
SWF air.swf SWF

var airSWF:Object; // This is the reference to the main class of air.swf


var airSWFLoader:Loader = new Loader(); // Used to load the SWF
var loaderContext:LoaderContext = new LoaderContext();
// Used to set the application domain
loaderContext.applicationDomain = ApplicationDomain.currentDomain;
airSWFLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
airSWFLoader.load(new URLRequest("http://airdownload.adobe.com/air/browserapi/air.swf"),
loaderContext);
function onInit(e:Event):void
{
airSWF = e.target.content;
}

air.swf Loader contentLoaderInfo init air.swf API

AIR SDK Flex SDK badge.swf air.swf 190 badge.swf

AIR air.swf SWF

SWF http://airdownload.adobe.com/air/browserapi/air.swf air.swf getStatus()


193 air.swf
air.swf SWF air.swf getStatus()
var status:String = airSWF.getStatus();

getStatus()

"available"

"unavailable"

"installed"

2011/10/13

ADOBE AIR

194

AIR.SWF API

Flash Player Windows Mac OS 9 3 Linux 10


getStatus()

AIR
SWF http://airdownload.adobe.com/air/browserapi/air.swf air.swf
getApplicationVersion() AIR ID ID
193 air.swf
air.swf SWF air.swf getApplicationVersion()
var appID:String = "com.example.air.myTestApplication";
var pubID:String = "02D88EEED35F84C264A183921344EEA353A629FD.1";
airSWF.getApplicationVersion(appID, pubID, versionDetectCallback);
function versionDetectCallback(version:String):void
{
if (version == null)
{
trace("Not installed.");
// Take appropriate actions. For instance, present the user with
// an option to install the application.
}
else
{
trace("Version", version, "installed.");
// Take appropriate actions. For instance, enable the
// user interface to launch the application.
}
}

getApplicationVersion()

appID

ID 169 id

pubID

ID 178 publisherID
ID pubID ()

callback

getApplicationVersion()

null

Flash Player Windows Mac OS 9 3 Linux 10


getApplicationVersion()
AIR 1.5.3 ID ID

ID

AIR
SWF http://airdownload.adobe.com/air/browserapi/air.swf air.swf installApplication()
AIR 193 air.swf
air.swf SWF air.swf installApplication()

2011/10/13

ADOBE AIR

195

AIR.SWF API

var url:String = "http://www.example.com/myApplication.air";


var runtimeVersion:String = "1.0";
var arguments:Array = ["launchFromBrowser"]; // Optional
airSWF.installApplication(url, runtimeVersion, arguments);

installApplication()

url

AIR URL URL

runtimeVersion

1.0

arguments

allowBrowserInvocation true
154 AIR
NativeApplication

BrowserInvokeEvent 195 AIR

installApplication()
Flash Player Windows Mac OS 9 3 Linux 10
installApplication()
Mac
Windows
air.swf getApplicationVersion()
194 AIR
LocalConnection SWF Flash Player
AIR ActionScript Flash Player AIR HTML

AIR

<allowBrowserInvocation>true</allowBrowserInvocation>

154 AIR
SWF http://airdownload.adobe.com/air/browserapi/air.swf air.swf

launchApplication() AIR 193 air.swf


air.swf SWF air.swf launchApplication()
var appID:String = "com.example.air.myTestApplication";
var pubID:String = "02D88EEED35F84C264A183921344EEA353A629FD.1";
var arguments:Array = ["launchFromBrowser"]; // Optional
airSWF.launchApplication(appID, pubID, arguments);

launchApplication() air.swf SWF


AIR allowBrowserInvocation

2011/10/13

ADOBE AIR

196

AIR.SWF API

appID

ID 169 id

pubID

ID 178 publisherID
ID pubID ()

arguments

NativeApplication arguments

BrowserInvokeEvent

launchApplication()
Flash Player Windows Mac OS 9 3 Linux 10
launchApplication()
allowBrowserInvocation false launchApplication()
air.swf getApplicationVersion()
194 AIR
NativeApplication BrowserInvokeEvent
AIR ActionScript AIR HTML

AIR ActionScript
AIR HTML
LocalConnection SWF Flash

Player AIR ActionScript Flash Player AIR HTML


AIR 1.5.3 ID ID

ID

2011/10/13

197

17 : AIR
AIR AIR Adobe AIR

Updater
Updater update() AIR
AIR Updater
AIR ID ID ID

AIR 1.5.3 <publisherID> AIR 1.5.2


178 publisherID
AIR 1.1
AIR
AIR
AIR 1.5 AdobeAIR API

AIR

147

AIR AIR

Adobe AIR WebKit WebKit AIR

HTML
HTML ActionScript HTML HTML

Updater flash.desktop update()


AIR Sample_App_v2.air
ActionScript
var updater:Updater = new Updater();
var airFile:File = File.desktopDirectory.resolvePath("Sample_App_v2.air");
var version:String = "2.01";
updater.update(airFile, version);

JavaScript
var updater = new air.Updater();
var airFile = air.File.desktopDirectory.resolvePath("Sample_App_v2.air");
var version = "2.01";
updater.update(airFile, version);

Updater AIR 199


AIR

2011/10/13

ADOBE AIR

198

AIR

Updater.update()
update() AIR
AIR ID ID update() ID ID
ID ID 154 AIR
update() version

Mac OS
Windows Linux

ADL update()

update() version AIR version versionNumber


version AIR

AIR
AIR 2.5 2.01 version 2 AIR 2.5
(.) .0 1.0 67.89.999

Adobe AIR Web AIR Web AIR


update() version AIR

AIR AIR AIR AIR ZIP

154 AIR

Adobe AIR
AIR
URL 180
151 AIR
125 ADT

URL
XML URL

URL

2011/10/13

ADOBE AIR

199

AIR

AIR

customUpdateUI
<customUpdateUI>true</customUpdateUI>

ID ID AIR
AIR 163 customUpdateUI
NativeApplication.nativeApplication load

Updater

AIR
Updater AIR
AIR 1.5 AIR

Updater update() 202


URL (http://example.com/air/updates/Sample_App_v2.air) AIR AIR

ActionScript

2011/10/13

ADOBE AIR

200

AIR

var urlString:String = "http://example.com/air/updates/Sample_App_v2.air";


var urlReq:URLRequest = new URLRequest(urlString);
var urlStream:URLStream = new URLStream();
var fileData:ByteArray = new ByteArray();
urlStream.addEventListener(Event.COMPLETE, loaded);
urlStream.load(urlReq);
function loaded(event:Event):void {
urlStream.readBytes(fileData, 0, urlStream.bytesAvailable);
writeAirFile();
}
function writeAirFile():void {
var file:File = File.applicationStorageDirectory.resolvePath("My App v2.air");
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.WRITE);
fileStream.writeBytes(fileData, 0, fileData.length);
fileStream.close();
trace("The AIR file is written.");
}

JavaScript
var urlString = "http://example.com/air/updates/Sample_App_v2.air";
var urlReq = new air.URLRequest(urlString);
var urlStream = new air.URLStream();
var fileData = new air.ByteArray();
urlStream.addEventListener(air.Event.COMPLETE, loaded);
urlStream.load(urlReq);
function loaded(event) {
urlStream.readBytes(fileData, 0, urlStream.bytesAvailable);
writeAirFile();
}
function writeAirFile() {
var file = air.File.desktopDirectory.resolvePath("My App v2.air");
var fileStream = new air.FileStream();
fileStream.open(file, air.FileMode.WRITE);
fileStream.writeBytes(fileData, 0, fileData.length);
fileStream.close();
trace("The AIR file is written.");
}

ActionScript
HTML

AIR 1.5 AIR

202

2011/10/13

ADOBE AIR

201

AIR

Flex
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
title="Sample Version Checker Application"
applicationComplete="system extension()">
<mx:Script>
<![CDATA[
import flash.filesystem.*;
public var file:File;
public var currentVersion:String = "1.2";
public function system extension():void {
file = File.applicationStorageDirectory;
file = file.resolvePath("Preferences/version.txt");
trace(file.nativePath);
if(file.exists) {
checkVersion();
} else {
firstRun();
}
}
private function checkVersion():void {
var stream:FileStream = new FileStream();
stream.open(file, FileMode.READ);
var reversion:String = stream.readUTFBytes(stream.bytesAvailable);
stream.close();
if (reversion != currentVersion) {
log.text = "You have updated to version " + currentVersion + ".\n";
} else {
saveFile();
}
log.text += "Welcome to the application.";
}
private function firstRun():void {
log.text = "Thank you for installing the application. \n"
+ "This is the first time you have run it.";
saveFile();
}
private function saveFile():void {
var stream:FileStream = new FileStream();
stream.open(file, FileMode.WRITE);
stream.writeUTFBytes(currentVersion);
stream.close();
}
]]>
</mx:Script>
<mx:TextArea ID="log" width="100%" height="100%" />
</mx:WindowedApplication>

JavaScript

2011/10/13

ADOBE AIR

202

AIR

<html>
<head>
<script src="AIRAliases.js" />
<script>
var file;
var currentVersion = "1.2";
function system extension() {
file = air.File.appStorageDirectory.resolvePath("Preferences/version.txt");
air.trace(file.nativePath);
if(file.exists) {
checkVersion();
} else {
firstRun();
}
}
function checkVersion() {
var stream = new air.FileStream();
stream.open(file, air.FileMode.READ);
var reversion = stream.readUTFBytes(stream.bytesAvailable);
stream.close();
if (reversion != currentVersion) {
window.document.getElementById("log").innerHTML
= "You have updated to version " + currentVersion + ".\n";
} else {
saveFile();
}
window.document.getElementById("log").innerHTML
+= "Welcome to the application.";
}
function firstRun() {
window.document.getElementById("log").innerHTML
= "Thank you for installing the application. \n"
+ "This is the first time you have run it.";
saveFile();
}
function saveFile() {
var stream = new air.FileStream();
stream.open(file, air.FileMode.WRITE);
stream.writeUTFBytes(currentVersion);
stream.close();
}
</script>
</head>
<body onLoad="system extension()">
<textarea ID="log" rows="100%" cols="100%" />
</body>
</html>

AdobeAIR API API AIR


AIR


Web AIR
2011/10/13

ADOBE AIR

203

AIR

AIR

AIR AIR XML

AIR Adobe AIR Updater Updater


AIR AIR

AIR
AIR AIR 2 SDK frameworks/libs/air
applicationupdater.swc ActionScript
applicationupdater.swf JavaScript
applicationupdater_ui.swc Flex 4
applicationupdater_ui.swf JavaScript

203 Flex
203 HTML AIR
204 ApplicationUpdaterUI

Flex
AIR 2 SDK frameworks/libs/air SWC Flex Flash
Flex SDK amxmlc ApplicationUpdater.swc
ApplicationUpdater_UI.swc Flex SDK lib
ApplicationUpdater.swc
amxmlc -library-path+=lib/ApplicationUpdater.swc

-- myApp.mxml

Flex SDK lib ApplicationUpdater_UI.swc


amxmlc -library-path+=lib/ApplicationUpdater_UI.swc

-- myApp.mxml

Flash Builder Flex Build SWC


SWC amxmlc Flex SDK Flash Builder

HTML AIR
frameworks/html

applicationupdater.swf
applicationupdater_ui.swf
2011/10/13

ADOBE AIR

204

AIR

AIR JavaScript SWF


applicationupdater.swf applicationupdater_ui.swf
HTML JavaScript script
<script src="applicationUpdater.swf" type="application/x-shockwave-flash"/>

script applicationupdater_ui.swf
<script src="applicationupdater_ui.swf" type="application/x-shockwave-flash"/>

API

ApplicationUpdaterUI
ApplicationUpdaterUI
AIR

1 HTML AIR applicationupdaterui.swf


<script src="ApplicationUpdater_UI.swf" type="application/x-shockwave-flash"/>

2 AIR ApplicationUpdaterUI
ActionScript
var appUpdater:ApplicationUpdaterUI = new ApplicationUpdaterUI();

JavaScript
var appUpdater = new runtime.air.update.ApplicationUpdaterUI();

3 updateConfig.xml
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://ns.adobe.com/air/framework/update/configuration/1.0">
<url>http://example.com/updates/update.xml</url>
<delay>1</delay>
</configuration>

updateConfig.xml URL Web

delay

4 updateConfig.xml AIR
5 updater updateConfig.xml initialize()
ActionScript
appUpdater.configurationFile = new File("app:/updateConfig.xml");
appUpdater.initialize();

JavaScript
appUpdater.configurationFile = new air.File("app:/updateConfig.xml");
appUpdater.initialize();

6 AIR version

AIR Web

1 AIR Web
2 updateDescriptor.2.5.xml

2011/10/13

ADOBE AIR

205

AIR

<?xml version="1.0" encoding="utf-8"?>


<update xmlns="http://ns.adobe.com/air/framework/update/description/2.5">
<versionNumber>1.1</versionNumber>
<url>http://example.com/updates/sample_1.1.air</url>
<description>This is the latest version of the Sample application.</description>
</update>

updateDescriptor.xml versionNumber URL description AIR AIR 2.5


SDK

3 updateDescriptor.1.0.xml
<?xml version="1.0" encoding="utf-8"?>
<update xmlns="http://ns.adobe.com/air/framework/update/description/1.0">
<version>1.1</version>
<url>http://example.com/updates/sample_1.1.air</url>
<description>This is the latest version of the Sample application.</description>
</update>

updateDescriptor.xml versionURL description AIR AIR 2 SDK

AIR 2.5

4 updateDescriptor.2.5.xml updateDescriptor.1.0.xml AIR Web

Adobe AIR

Flex (http://www.adobe.com/go/learn_air_qs_update_framework_flex_cn)
Flash (http://www.adobe.com/go/learn_air_qs_update_framework_flash_cn)
HTML (http://www.adobe.com/go/learn_air_qs_update_framework_html_cn)

AIR 2.5
AIR 2.5 AIR 2 AIR 2.5
AIR 2.5 SDK
AIR 2.5 AIR 2.5 AIR 2 AIR 2.5
AIR 2.5 SDK AIR 2.5

AIR Updater AIR 2.5


1.0 2.0 1.0 2.0 2.0 2.5
AIR 2.5 API

1 1.0 1.0.1
a AIR 2.5 Application Updater
Flash AIR applicationupdater.swc applicationupdater_ui.swc
HTML AIR applicationupdater.swf applicationupdater_ui.swf

b 1.0.1

2011/10/13

ADOBE AIR

206

AIR

<?xml version="1.0" encoding="utf-8"?>


<update xmlns="http://ns.adobe.com/air/framework/update/description/2.0">
<version>1.0.1</version>
<url>http://example.com/updates/sample_1.0.1.air</url>
<description>This is the intermediate version.</description>
</update>

2 AIR 2.5 API 2.5 2.0


3 1.0.1 2.0
<?xml version="1.0" encoding="utf-8"?>
<update xmlns="http://ns.adobe.com/air/framework/update/description/2.5">
<version>2.0</version>
<url>http://example.com/updates/sample_2.0.air</url>
<description>This is the intermediate version.</description>
</update>

AIR Web
AIR Web
XML

AIR 2.5
http://ns.adobe.com/air/framework/update/description/1.0 AIR 2.5
http://ns.adobe.com/air/framework/update/description/2.5
AIR 2.5 AIR 1.0 AIR 2.5 updater
AIR 2.5 AIR 2.5
AIR
AIR 2.5

versionNumber AIR AIR 2.5 versionNumber


AIR versionNumber
AIR

version AIR AIR 2.5 version


AIR version AIR

versionLabel versionLabel 2.5


versionLabel

url AIR AIR


description
version url description
2.5
<?xml version="1.0" encoding="utf-8"?>
<update xmlns="http://ns.adobe.com/air/framework/update/description/2.5">
<versionNumber>1.1.1</versionNumber>
<url>http://example.com/updates/sample_1.1.1.air</url>
<description>This is the latest version of the Sample application.</description>
</update>

1.0

2011/10/13

ADOBE AIR

207

AIR

<?xml version="1.0" encoding="utf-8"?>


<update xmlns="http://ns.adobe.com/air/framework/update/description/1.0">
<version>1.1.1</version>
<url>http://example.com/updates/sample_1.1.1.air</url>
<description>This is the latest version of the Sample application.</description>
</update>

description lang text


<?xml version="1.0" encoding="utf-8"?>
<update xmlns="http://ns.adobe.com/air/framework/update/description/2.5">
<versionNumber>1.1.1</versionNumber>
<url>http://example.com/updates/sample_1.1.1.air</url>
<description>
<text xml:lang="en">English description</text>
<text xml:lang="fr">French description</text>
<text xml:lang="ro">Romanian description</text>
</description>
</update>

AIR Web

updater
AIR 203 Flex 203 HTML AIR
updater

ActionScript
var appUpdater:ApplicationUpdater = new ApplicationUpdater();

JavaScript
var appUpdater = new runtime.air.update.ApplicationUpdater();
ApplicationUpdater ApplicationUpdaterUI

ActionScript
var appUpdater:ApplicationUpdaterUI = new ApplicationUpdaterUI();

JavaScript
var appUpdater = new runtime.air.update.ApplicationUpdaterUI();
appUpdater updater

ApplicationUpdater ApplicationUpdaterUI ActionScript


JavaScript

XML
XML
updateURL URLRequest
updateURL 206 AIR

2011/10/13

ADOBE AIR

208

AIR

Web updater updater initialize()


210

delay 0.25 0

updater
ApplicationUpdaterUI updateURL delay
defaultUIdialog dialog name dialog
visible True name

"checkForUpdate"
"downloadUpdate"
"downloadProgress"
"installUpdate"
"fileUpdate"
"unexpectedError"
false
ApplicationUpdater
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://ns.adobe.com/air/framework/update/configuration/1.0">
<url>http://example.com/updates/update.xml</url>
<delay>1</delay>
</configuration>

ApplicationUpdaterUI defaultUI
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://ns.adobe.com/air/framework/update/configuration/1.0">
<url>http://example.com/updates/update.xml</url>
<delay>1</delay>
<defaultUI>
<dialog name="checkForUpdate" visible="false" />
<dialog name="downloadUpdate" visible="false" />
<dialog name="downloadProgress" visible="false" />
</defaultUI>
</configuration>

configurationFile

ActionScript
appUpdater.configurationFile = new File("app:/cfg/updateConfig.xml");

JavaScript
appUpdater.configurationFile = new air.File("app:/cfg/updateConfig.xml");

config-template.xml

ActionScript JavaScript

appUpdater.updateURL = " http://example.com/updates/update.xml";


appUpdater.delay = 1;

2011/10/13

ADOBE AIR

209

AIR

updater updateURL delay updateURL delay


URL

updateURL 206
AIR Web updater updater initialize() 210

ApplicationUpdaterUI updater
isCheckForUpdateVisible
isDownloadUpdateVisible
isDownloadProgressVisible
isInstallUpdateVisible
isFileUpdateVisible
isUnexpectedErrorVisible
ApplicationUpdaterUI True
False

AIR
1 updater 207

2 updater
3 updater AIR
4 updater

updater ApplicationUpdater
ApplicationUpdaterUI updater

updater
updater ApplicationUpdater currentState

"UNINITIALIZED" updater
"INITIALIZING" updater
"READY" updater
"BEFORE_CHECKING" updater
"CHECKING" updater
"AVAILABLE" updater
"DOWNLOADING" updater AIR
"DOWNLOADED" updater AIR
"INSTALLING" updater AIR

2011/10/13

ADOBE AIR

210

AIR

"PENDING_INSTALLING" updater

updater updater

204 ApplicationUpdaterUI initialize()

appUpdater.initialize();




updater

UpdateEvent.INITIALIZED
ErrorEvent.ERROR
UpdateEvent.INITIALIZED
initialize() updater updater

checkNow()
appUpdater.checkNow();

checkNow() updater

UpdateEvent.CHECK_FOR_UPDATE
checkForUpdate updater checkForUpdate()

ApplicationUpdaterUI
ApplicationUpdaterUI
ApplicationUpdaterUI cancelUpdate()
ApplicationUpdaterUI updater
207

ApplicationUpdater
ApplicationUpdater preventDefault() 209

2011/10/13

ADOBE AIR

211

AIR

ApplicationUpdater checkForUpdate updater


checkForUpdate updater checkForUpdate()

appUpdater.checkForUpdate();

checkForUpdate() updater checkForUpdate()

updater
StatusUpdateEvent.UPDATE_STATUS updater
available true false
version
details ("")


"en" 206
AIR Web

StatusUpdateErrorEvent.UPDATE_ERROR updater

AIR
updater ApplicationUpdater updateStatus
downloadUpdate()
appUpdater.downloadUpdate();

updater AIR

downloadUpdate()

UpdateEvent.DOWNLOAD_START ApplicationUpdaterUI

ProgressEvent.PROGRESS
DownloadErrorEvent.DOWNLOAD_ERROR HTTP
404 - File not found 404 - errorID
subErrorID

UpdateEvent.DOWNLOAD_COMPLETE updater
ApplicationUpdater ApplicationUpdaterUI

ApplicationUpdater downloadComplete

installUpdate()
appUpdater.installUpdate(file);

updater AIR file AIR File

2011/10/13

ADOBE AIR

212

AIR

installUpdate() ApplicationUpdater beforeInstall

UpdateEvent.BEFORE_INSTALL
Event preventDefault()
checkNow()

AIR
installFromAIRFile() AIR
appUpdater.installFromAIRFile();

updater AIR

installFromAIRFile()

StatusFileUpdateEvent.FILE_UPDATE_STATUS ApplicationUpdater installFromAIRFile()

available true false


version
path
StatusFileUpdateEvent True

installUpdate()

StatusFileUpdateErrorEvent.FILE_UPDATE_ERROR updater AIR

cancelUpdate()
appUpdater.cancelUpdate();

updater

ApplicationUpdaterUI
ApplicationUpdaterUI

description lang text

<?xml version="1.0" encoding="utf-8"?>


<update xmlns="http://ns.adobe.com/air/framework/update/description/1.0">
<version>1.1a1</version>
<url>http://example.com/updates/sample_1.1a1.air</url>
<description>
<text xml:lang="en">English description</text>
<text xml:lang="fr">French description</text>
<text xml:lang="ro">Romanian description</text>
</description>
</update>

AIR Web

2011/10/13

ADOBE AIR

213

AIR

Flex "ApplicationUpdaterDialogs"
JavaScript updater addResources()

JavaScript ApplicationUpdaterUI localeChain


JavaScript (HTML) Flex ResourceManager
JavaScript
appUpdater.addResources("ro_RO",
{titleCheck: "Titlu", msgCheck: "Mesaj", btnCheck: "Buton"});
appUpdater.addResources("hu", {titleCheck: "Cm", msgCheck: "zenet"});
var languages = ["ro", "hu"];
languages = languages.concat(air.Capabilities.languages);
var sortedLanguages = air.Localizer.sortLanguagesByPreference(languages,
air.Capabilities.language,
"en-US");
sortedLanguages.push("en-US");
appUpdater.localeChain = sortedLanguages;

ApplicationUpdaterUI addResources()

2011/10/13

214

18 :
Web HTML HTML AIR

Adobe AIR SDK AIRSourceViewer.js JavaScript

Source Viewer
Source Viewer JavaScript AIRSourceViewer.js AIR SDK frameworks
Source Viewer AIRSourceViewer.js HTML

<script type="text/javascript" src="AIRSourceViewer.js"></script>

AIRSourceViewer.js SourceViewer JavaScript air.SourceViewer


SourceViewer getDefault() setup() viewSource()

getDefault()

SourceViewer

setup()

Source Viewer 214 Source Viewer

viewSource()

Source Viewer

JavaScript Source Viewer Source Viewer


var viewer = air.SourceViewer.getDefault();
viewer.viewSource();

Source Viewer
config() Source Viewer configObject configObject Source
Viewer default exclude initialPosition modal typesToRemove typesToAdd

default
Source Viewer
JavaScript Source Viewer index.html
var viewer = air.SourceViewer.getDefault();
var configObj = {};
configObj.default = "index.html";
viewer.viewSource(configObj);

exclude
Source Viewer
JavaScript Source Viewer AIRSourceViewer.js
Images Sounds

2011/10/13

ADOBE AIR

215

var viewer = air.SourceViewer.getDefault();


var configObj = {};
configObj.exclude = ["AIRSourceViewer.js", "Images" "Sounds"];
viewer.viewSource(configObj);

initialPosition
Source Viewer x y
JavaScript [40, 60] X = 40 Y = 60 Source Viewer
var viewer = air.SourceViewer.getDefault();
var configObj = {};
configObj.initialPosition = [40, 60];
viewer.viewSource(configObj);

modal
Source Viewer (true) (false) Source Viewer

JavaScript Source Viewer Source Viewer

var viewer = air.SourceViewer.getDefault();


var configObj = {};
configObj.modal = false;
viewer.viewSource(configObj);

typesToAdd
Source Viewer
Source Viewer

- TXT XML MXML HTM HTML JS AS CSS INI BAT PROPERTIES CONFIG
- JPG JPEG PNG GIF
typesToExclude
JavaScript VCF VCARD Source Viewer
var viewer = air.SourceViewer.getDefault();
var configObj = {};
configObj.typesToAdd = ["text.vcf", "text.vcard"];
viewer.viewSource(configObj);

text image

typesToExclude
Source Viewer
Source Viewer

- TXT XML MXML HTM HTML JS AS CSS INI BAT PROPERTIES CONFIG
- JPG JPEG PNG GIF
JavaScript GIF XML Source Viewer

2011/10/13

ADOBE AIR

216

var viewer = air.SourceViewer.getDefault();


var configObj = {};
configObj.typesToExclude = ["image.gif", "text.xml"];
viewer.viewSource(configObj);

text image

Source Viewer
Source Viewer
Source Viewer
<html>
<head>
<title>Source Viewer Sample</title>
<script type="text/javascript" src="AIRSourceViewer.js"></script>
<script type="text/javascript">
function showSources(){
var viewer = air.SourceViewer.getDefault();
viewer.viewSource()
}
</script>
</head>
<body>
<p>Click to view the source files.</p>
<input type="button"
onclick="showSources()"
value="View Source" />
</body>
</html>

2011/10/13

ADOBE AIR

217

Source Viewer
SourceViewer viewSource() AIR Source Viewer

Source Viewer HTML JS TXT XML


JPG JPEG PNG GIF
(Cannot retrieve text content from this filetype)
setup() 214 Source Viewer

2011/10/13

218

19 : AIR HTML
Adobe AIR SDK AIRIntrospector.js JavaScript HTML

AIR
Adobe AIR HTML/JavaScript AIR HTML
HTML
DOM

JavaScript

DOM
DOM
CSS JavaScript
HTML
AIR HTML

XMLHttpRequest responseText responseXML


AIR
AIR AIRIntrospector.js JavaScript AIR SDK
AIR AIRIntrospector.js HTML

<script type="text/javascript" src="AIRIntrospector.js"></script>

HTML
AIRIntrospector.js AIR

AIRIntrospector.js Console JavaScript air.Introspector.Console


AIR

Console log() warn() info() error() dump()

2011/10/13

ADOBE AIR

219

AIR HTML

log() warn() info() error() log()


test
var test = "hello";
air.Introspector.Console.log(test);

HTML (btn1)

<html>
<head>
<title>Source Viewer Sample</title>
<script type="text/javascript" src="scripts/AIRIntrospector.js"></script>
<script type="text/javascript">
function logBtn()
{
var button1 = document.getElementById("btn1");
air.Introspector.Console.log(button1);
}
</script>
</head>
<body>
<p>Click to view the button object in the Console.</p>
<input type="button" id="btn1"
onclick="logBtn()"
value="Log" />
</body>
</html>

btn1

info() error() warn() log()

2011/10/13

ADOBE AIR

220

AIR HTML

info()
error()
warn()

log() warn() info() error()


dump()

dumpObject

levels

dump()

var testObject = new Object();


testObject.foo = "foo";
testObject.bar = 234;
air.Introspector.Console.dump(testObject);

testObject

AIR
AIRIntrospectorConfig JavaScript AIR
100
var AIRIntrospectorConfig = new Object();
AIRIntrospectorConfig.wrapColumns = 100;

AIRIntrospectorConfig AIRIntrospector.js script

AIRIntrospectorConfig

closeIntrospectorOnExit

true

debuggerKey

123 F12

AIR

debugRuntimeObjects

true

JavaScript

flashTabLabels

XMLHttpRequest

true

introspectorKey

122 F11

(Inspect)

showTimestamp

true

showSender

true

wrapColumns

2000

2011/10/13

ADOBE AIR

221

AIR HTML

AIR
AIR F12 Console 218
F12 220 AIR

AIR HTML DOM


XHR

2011/10/13

ADOBE AIR

222

AIR HTML

air.Introspector.Console 218

(Clear Console)
(Save Console To

File)
(Save Console

To Clipboard)
Console (Save Console To

File)
Ctrl+F (Windows) Command+F (Mac OS)

2011/10/13

ADOBE AIR

223

AIR HTML

HTML
HTML HTML DOM + -

HTML
(Inspect) AIR HTML
DOM HTML

(Inspect) F11 F11 220


AIR
(Refresh Active Window) AIR HTML

Ctrl+F (Windows) Command+F (Mac OS)

2011/10/13

ADOBE AIR

224

AIR HTML

DOM
DOM

(Refresh Active Window) AIR DOM

Ctrl+F (Windows) Command+F (Mac OS)

2011/10/13

ADOBE AIR

225

AIR HTML

CSS JavaScript

(Refresh Active Window) AIR

Ctrl+F (Windows) Command+F (Mac OS)


- HTML
- UI Ajax

2011/10/13

ADOBE AIR

226

AIR HTML

- AIR AIR

(Refresh Active Window) AIR


Ctrl+F (Windows) Command+F (Mac OS)

XHR
XHR XMLHttpRequest
XMLHttpRequest responseText responseXML

2011/10/13

ADOBE AIR

227

AIR HTML

Ctrl+F (Windows) Command+F (Mac OS)

AIR
iframe frame Adobe AIR HTML
ActionScript Adobe AIR HTML HTML AIR

AIRIntrospector.js (iframe)
parentSandboxBridge AIR

parentSandboxBridge = mytrace: function(str) {runtime.trace(str)}} ;

parentSandboxBridge.mytrace = function(str) {runtime.trace(str)};

F12 air.Introspector.Console AIR


(Open Introspector) iframe

AIR AIR

AIR
AIR

2011/10/13

228

20 : AIR
Adobe AIR 1.1
Adobe AIR
ActionScript 3.0 Flex ActionScript 3.0

AIR
AIR 1.1 AIR










AIR 1.5

Adobe AIR Flex


HTML

AIR
Adobe AIR 1.1
name description

2011/10/13

ADOBE AIR

229

AIR

<name>
<text xml:lang="en">Sample 1.0</text>
<text xml:lang="fr">chantillon 1.0</text>
<text xml:lang="de">Stichprobe 1.0</text>
</name>

xml:lang RFC4646 (http://www.ietf.org/rfc/rfc4646.txt)

name AIR AIR

description AIR

AIR

AIR AIR
157 AIR

Adobe AIR Flex


HTML

AIR HTML HTML


Adobe AIR 1.1
AIR 1.1 SDK HTML AIRLocalizer.js JavaScript AIR SDK frameworks
AIRLocalizer.js air.Localizer

AIR HTML
AIRLocalizer.js script HTML

<script src="AIRLocalizer.js" type="text/javascript" charset="utf-8"></script>

JavaScript air.Localizer.localizer
<script>
var localizer = air.Localizer.localizer;
</script>

air.Localizer.localizer Localizer

getFile()

234

getLocaleChain()

233

getResourceBundle()

234

getString()

234

setBundlesDirectory()

233 AIR HTML Localizer

2011/10/13

ADOBE AIR

230

AIR

setLocalAttributePrefix()

HTML DOM localizer 233 AIR HTML Localizer


setLocaleChain()

233

sortLanguagesByPreference() 233
update()

HTML DOM DOM 231


update() 232 DOM

Localizer

localizer

Localizer

ultimateFallbackLocale

233

HTML

locale 233 AIR HTML


Localizer

fr en (_) /
en_us en-us HTML
locale
HTML getFile() 234

.properties
"Hello in English." greeting
greeting=Hello in English.

title=Sample Application
greeting=Hello in English.
exitMessage=Thank you for using the application.
color1=Red
color2=Green
color3=Blue

en
fr
title=Application Example
greeting=Bonjour en franais.
exitMessage=Merci d'avoir utilis cette application.
color1=Rouge
color2=Vert
color3=Bleu

2011/10/13

ADOBE AIR

231

AIR

legal.properties

UTF-8

AIRLocalizer.js
230 AIRLocalizer.js
Capabilities.languages
en en_US en_UK AIR HTML Localizer
en ["en", "en_US", "en_UK"]
en en_US
en-US ["en_US", "en", en_UK"]

en_US en

Localizer setLocaleChain() 233

DOM
title local_innerHTML
"local_" "local_"
title innerHTML innerHTML (attribute) (property)
(default.properties) mainWindowTitle
<title local_innerHTML="default.mainWindowTitle"/>

localizer

p innerHTML (attribute) (property) greeting


<p local_innerHTML="default.greeting" />

input (attribute) (property) btnBlue


<input type="button" local_value="default.btnBlue" />

HTML DOM Localizer update() update()


Localizer DOM ("local_...")
air.Localizer.localizer.update();

innerHTML local_innerHTML
value local_value
<input type="text" value="Blue" local_value="default.btnBlue"/>

DOM 232 DOM

2011/10/13

ADOBE AIR

232

AIR

AIR HTML Localizer "local_"

local_innerHTML innerHTML local_value


value Localizer "local_" 233 AIR
HTML Localizer

DOM
Localizer HTML DOM HTML

localizer HTML DOM Localizer update()


air.Localizer.localizer.update();

DOM update() update() parentNode


parentNode DOM update() parentNode

div
<div id="colorsDiv">
<h1 local_innerHTML="default.lblColors" ></h1>
<p><input type="button" local_value="default.btnBlue" /></p>
<p><input type="button" local_value="default.btnRed" /></p>
<p><input type="button" local_value="default.btnGreen" /></p>
</div>

JavaScript
var divElement = window.document.getElementById("colorsDiv");
air.Localizer.localizer.update(divElement);

"local_"
lblColors default.properties

"default.lblColors" innerHTML
update() resourceNotFound air.Localizer.RESOURCE_NOT_FOUND
"resourceNotFound"bundleName resourceName locale bundleName
resourceName locale

update() bundleNotFound air.Localizer.BUNDLE_NOT_FOUND

"bundleNotFound"bundleName localebundleName locale

update() resourceNotFound bundleNotFound resourceNotFound


bundleNotFound
air.Localizer.localizer.addEventListener(air.Localizer.RESOURCE_NOT_FOUND, rnfHandler);
air.Localizer.localizer.addEventListener(air.Localizer.BUNDLE_NOT_FOUND, rnfHandler);
air.Localizer.localizer.update();
function rnfHandler(event)
{
alert(event.bundleName + ": " + event.resourceName + ":." + event.locale);
}
function bnfHandler(event)
{
alert(event.bundleName + ":." + event.locale);
}

2011/10/13

ADOBE AIR

233

AIR

AIR HTML Localizer


Localizer setBundlesDirectory() Localizer setLocalAttributePrefix()
Localizer
Localizer setBundlesDirectory()
path path

"locales"
appapp-storage file URL "app://languages" http URL URL
File
URL

File ActionScript
File HTML

air.Localizer.localizer.setBundlesDirectory("languages");

path BundlePathNotFoundError

"BundlePathNotFoundError" name message


AIR HTML Localizer "local_" local_innerHTML
input innerHTML
<p local_innerHTML="default.greeting" />

Localizer setLocalAttributePrefix() "local_"


loc_
air.Localizer.localizer.setLocalAttributePrefix("loc_");

("local_")
HTML
HTML 231 DOM

AIRLocalizer.js
231
Localizer setLocaleChain()
setLocaleChain() chain ["fr_FR","fr","fr_CA"]

chain IllegalArgumentsError

Localizer getLocaleChain()

var currentChain = air.Localizer.localizer.getLocaleChain();


newLocales = ["fr_FR", "fr"];
air.Localizer.localizer.setLocaleChain(newLocales.concat(currentChain));

2011/10/13

ADOBE AIR

234

AIR

setLocaleChain() "change" air.Localizer.LOCALE_CHANGE

"change" localeChain

var currentChain = air.Localizer.localizer.getLocaleChain();


newLocales = ["fr_FR", "fr"];
localizer.addEventListener(air.Localizer.LOCALE_CHANGE, changeHandler);
air.Localizer.localizer.setLocaleChain(newLocales.concat(currentChain));
function changeHandler(event)
{
alert(event.localeChain);
}

air.Localizer.ultimateFallbackLocale "en"

air.Localizer.ultimateFallbackLocale = "fr";

Localizer getString() locale

bundleName

.properties
"alerts" Localizer alerts.properties

resourceName

templateArgs

templateArgs

["Ral", "4"] "Hello, {0} You have {1} new messages."


"Hello, Ral. You have 4 new messages."
null
locale

"en" "en_us" "fr"

HTML DOM

HTML fr_FR error114


alert()
alert(air.Localizer.localizer.getString("default", "error114", null, "fr_FR"));

getString() resourceNotFound air.Localizer.RESOURCE_NOT_FOUND


"resourceNotFound"bundleName resourceName locale bundleName
resourceName locale

getString() bundleNotFound air.Localizer.BUNDLE_NOT_FOUND

"bundleNotFound"bundleName localebundleName locale

getString() resourceNotFound bundleNotFound


resourceNotFound bundleNotFound

2011/10/13

ADOBE AIR

235

AIR

air.Localizerlocalizer.addEventListener(air.Localizer.RESOURCE_NOT_FOUND, rnfHandler);
air.Localizerlocalizer.addEventListener(air.Localizer.BUNDLE_NOT_FOUND, bnfHandler);
var str = air.Localizer.localizer.getString("default", "error114", null, "fr_FR");
function rnfHandler(event)
{
alert(event.bundleName + ": " + event.resourceName + ":." + event.locale);
}
function bnfHandler(event)
{
alert(event.bundleName + ":." + event.locale);
}

Localizer getResourceBundle()
null
locale bundleName

locale

"fr"

bundleName

document.write() fr document.write() str1


str2
var aboutWin = window.open();
var bundle = localizer.getResourceBundle("fr", "default");
aboutWin.document.write(bundle.str1);
aboutWin.document.write("<br/>");
aboutWin.document.write(bundle.str2);
aboutWin.document.write("<br/>");

getResourceBundle() bundleNotFound air.Localizer.BUNDLE_NOT_FOUND


"bundleNotFound"bundleName locale bundleName
locale

Localizer getFile() UTF-8

resourceFileName

"about.html"

templateArgs

templateArgs

["Ral", "4"]
<html>
<body>Hello, {0}. You have {1} new messages.</body>
</html>

<html>
<body>Hello, Ral. You have 4 new messages. </body>
</html>
locale

"en_GB"

resourceFileName

fr about.html document.write()

2011/10/13

ADOBE AIR

236

AIR

var aboutWin = window.open();


var aboutHtml = localizer.getFile("about.html", null, "fr");
aboutWin.document.close();
aboutWin.document.write(aboutHtml);

getFile() fileNotFound air.Localizer.FILE_NOT_FOUND


"resourceNotFound"getFile() fileNotFound fileName
locale fileName locale

air.Localizer.localizer.addEventListener(air.Localizer.FILE_NOT_FOUND, fnfHandler);
air.Localizer.localizer.getFile("missing.html", null, "fr");
function fnfHandler(event)
{
alert(event.fileName + ": " + event.locale);
}

HTML

2011/10/13

237

21 :
AIR SDK SDK bin

Windows Mac Linux


Internet

Bash shell Linux Mac OS


shell

shell $PATH
echo $PATH

/usr/bin:/bin:/usr/sbin:/usr/local/bin:/usr/x11/bin

AIR SDK bin shell ADT ADL AIR SDK

/Users/fred/SDKs/AIR
export PATH=$PATH:/Users/fred/SDKs/AIR/bin:/Users/fred/SDKs/android/tools

/Users/fred\ jones/SDKs/AIR\ 2.5\ SDK/bin

echo
echo $PATH
/usr/bin:/bin:/usr/sbin:/usr/local/bin:/usr/x11/bin:/Users/fred/SDKs/AIR/bin:/Users/fred/SDKs/android/too
ls

adt -version

$PATH ADT

shell Mac OS ~/username


.bash_profile Ubuntu
.bashrc Linux shell
shell

1
cd

2 shell cat >> shell


Mac OS .bash_profile Ubuntu .bashrc
cat >> .bash_profile

3
export PATH=$PATH:/Users/cward/SDKs/android/tools:/Users/cward/SDKs/AIR/bin

2011/10/13

ADOBE AIR

238

4 CTRL-SHIFT-D
5
cat .bash_profile

6
echo $PATH

SDK shell

Windows
Windows

set path

Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

AIR SDK bin ADT ADL AIR SDK


C:\SDKs\AIR

1
2
3
4
5
6
;C:\SDKs\AIR\bin

adt -version

AIR SDK

2011/10/13

You might also like