使用 Adobe® Flash® CS4 Professional 开发 Adobe® AIR™ 1.5 应用程序

Size: px
Start display at page:

Download "使用 Adobe® Flash® CS4 Professional 开发 Adobe® AIR™ 1.5 应用程序"

Transcription

1 ADOBE FLASH CS4 PROFESSIONAL ADOBE AIR 1.5

2 2008 Adobe Systems Incorporated. Adobe Flash CS4 Adobe AIR 1.5 Adobe Systems Incorporated Adobe Systems Incorporated Adobe Systems Incorporated Adobe, the Adobe logo, Acrobat, ActionScript, Adobe AIR, ColdFusion, Dreamweaver, Flash, Flex, Flex Builder, and Reader are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Apple, Macintosh, and Mac OS are trademarks of Apple Inc., registered in the United States and other countries. Java is a trademarks or registered trademark of Sun Microsystems, Inc. in the United States and other countries. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. All other trademarks are the property of their respective owners. This work is licensed under the Creative Commons Attribution Non-Commercial 3.0 License. To view a copy of this license, visit This product includes software developed by the Apache Software Foundation ( MPEG Layer-3 audio compression technology licensed by Fraunhofer IIS and Thomson Multimedia ( Speech compression and decompression technology licensed from Nellymoser, Inc. ( Video compression and decompression is powered by On2 TrueMotion video technology On2 Technologies, Inc. All Rights Reserved. This product includes software developed by the OpenSymphony Group ( This product contains either BSAFE and/or TIPEM software by RSA Security, Inc. Sorenson Spark video compression and decompression technology licensed from Sorenson Media, Inc. This product includes software developed by the IronSmith Project ( Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA. Notice to U.S. Government End Users. The Software and Documentation are Commercial Items, as that term is defined at 48 C.F.R , consisting of Commercial Computer Software and Commercial Computer Software Documentation, as such terms are used in 48 C.F.R or 48 C.F.R , as applicable. Consistent with 48 C.F.R or 48 C.F.R through , as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States. Adobe Systems Incorporated, 345 Park Avenue, San Jose, CA , USA. For U.S. Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the provisions of Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, , and The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference.

3 iii 1 : Adobe AIR Adobe AIR Adobe AIR AIR : Adobe AIR Flash CS3 Flash CS3 Adobe AIR Flash CS3 Adobe AIR Flash CS3 Adobe AIR Flash CS3 AIR : Adobe AIR AIR AIR : AIR 5 : Flash CS3 CS4 AIR Flash Hello World FLA Adobe AIR : Flash CS3 Professional Adobe AIR Adobe AIR Adobe AIR Adobe AIR Adobe AIR AIR : AIR AIR HTML

4 iv 8 : AIR : Adobe AIR AIR AIR : AIR : : AIR HTML : Window : AIR API AIR File

5 v : HTML : HTML : ByteArray ByteArray.zip : SQL SQL SQL SQL SQL SQL : 20 : HTML HTML AIR Webkit : HTML JavaScript HTMLLoader JavaScript JavaScript AIR API AIR URL ActionScript JavaScript ActionScript HTML DOM JavaScript HTML SWF HTML ActionScript

6 vi Date RegExp ActionScript HTML : HTML HTMLLoader ActionScript DOM JavaScript JavaScript : HTML HTMLLoader HTML HTML HTML HTML HTML HTMLLoader : PDF PDF PDF PDF AIR PDF : FLV NetStream DRM DRMStatusEvent DRMAuthenticateEvent DRMErrorEvent DRMManager DRMContentData :

7 vii 27 : : AIR : HTTP : URL URLRequest URLStream Web URL : 32 : AIR AIR AIR AIR : AIR AIR : AIR Flash HTML

8 viii 35 : AIR AIR Debug Launcher (ADL) AIR Developer Tool (ADT) AIR AIR ADT Apache Ant SDK

9 1 1 : Adobe AIR Adobe AIR AIR AIR AIR AIR AIR SDK Adobe Flex Builder 3 Adobe Flex 3 SDK AIR Adobe AIR ( AIR AIR Adobe AIR AIR Windows Mac OS X Linux Windows Mac (Authenticate) Mac OS Linux 1 2 chmod +x installer.bin Linux 3 4 AIR rpm dpkg adobeairv.n adobecerts X Server AIR mime application/vnd.adobe.air-application-installer-package+zip

10 Adobe AIR 2 Adobe AIR Windows 1 Windows > 2 3 Adobe AIR 4 / Mac Adobe AIR Uninstaller /Applications/Utilities Linux Adobe AIR Uninstaller AIR -uninstall AIR adobeairv.n adobecerts AIR AIR 1 AIR 2 Install Now 3 AIR Windows Windows Mac OS Applications Macintosh HD/Users/JoeUser/Applications/ Linux AIR /opt AIR

11 3 2 : Adobe AIR Flash CS3 Adobe Flash CS3 Professional Adobe AIR Flash Flash AIR Flash AIR Adobe Flash CS4 Professional AIR Flash Adobe AIR Flash CS3 Adobe AIR AIR Flash Player 9.x AIR 1.5 Flash Player 10 Flash CS4 Flash CS3 Adobe AIR Flash CS3 AIR Flash CS3 Professional Flash CS3 Professional Adobe Adobe AIR Adobe AIR 1 Adobe AIR Flash CS3 Adobe AIR Flash CS3 Adobe AIR Flash CS3 Adobe AIR Flash CS3 Adobe AIR 3 Flash CS3 Adobe AIR Flash CS3 Adobe AIR Flash CS3 Adobe AIR Flash Flash CS3 Adobe AIR Flash CS3 Adobe AIR Flash CS3 Adobe AIR Flash CS3 Adobe AIR 1 (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\AIK (Mac) HD:/Applications/Adobe Flash CS3/AIK 2 (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\<lang>\First Run\Commands\ (Mac) HD:/Applications/Adobe Flash CS3/First Run/Commands

12 Adobe AIR Flash CS3 4 / AIR AIR - Application and Installer Settings.jsfl AIR - Create AIR File.jsfl 3 (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\<lang>\Configuration\External Libraries\FLAir.dll (Mac) HD:/Applications/Adobe Flash CS3/Configuration/External Libraries/FLAir.bundle 4 (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\<lang>\Configuration\Players\AdobeAIR1_0.xml (Mac) HD:/Applications/Adobe Flash CS3/Configuration/Players/ AdobeAIR1_0.xml 5 (Windows) HD:\Document and Settings\<username>\Local Settings\Application Data\Adobe\Flash CS3\<lang>\Configuration\Commands\ (Mac) HD:/Users/<username>/Library/Application Support/Adobe/Flash CS3/<lang>/Configuration/Commands/ / AIR AIR - Application and Installer Settings.jsfl AIR - Create AIR File.jsfl Windows / Flash CS3 AIR Adobe AIR Flash -> Flash Adobe AIR 1.0 Flash (Adobe AIR) (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\en\FirstRun\StartPage (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\en\FirstRun\StartPage\resources MacIntosh Flash (Adobe AIR) Flash HD:/Users/<username>/Libraries/Application Support/Adobe/Flash CS3/<language>/Configuration/StartPage ActionScript 3.0 API Adobe AIR API playerglobal.swc ActionScript 3.0/Classes (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\ActionScript 3.0 Classes (Mac) HD:/Applications/Adobe Flash CS3/Configuration/ActionScript 3.0/Classes/ jsfl AIR - Application and Installer Settings.jsfl AIR - Publish AIR File.jsfl (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\en\FirstRun\Commands

13 Adobe AIR Flash CS3 5 (Mac) HD:/Applications/Adobe Flash CS3/First Run/Commands/ Adobe AIR (AIK) (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\AIK (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\External Libraries (Mac) HD:/Applications/Adobe Flash CS3/Configuration/External Libraries/ (Windows) HD:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\Players\ (Mac) HD:/Applications/Adobe Flash CS3/Configuration/Players

14 6 3 : Adobe AIR Adobe AIR Web Adobe Flash CS3 Professional Adobe Flash CS4 Professional Adobe Flex Adobe ActionScript 3.0 HTML JavaScript Ajax Internet (RIA) Adobe AIR ( Adobe AIR AIR Flash Flex HTML JavaScript Ajax Flash/Flex/ActionScript HTML/JavaScript/CSS/Ajax PDF AIR Flash/Flex (SWF) Flash Flex HTML PDF Flash Flex HTML HTML JS CSS PDF Flash/Flex (SWF) HTML HTML JS CSS Flash/Flex PDF HTML Flash/Flex (SWF) PDF HTML AIR AIR AIR AIR Web Web C C++ API AIR API AIR API AIR SWF ActionScript API Flex ActionScript HTML CSS JavaScript Ajax AIR Flash Flex HTML Ajax

15 Adobe AIR 7 AIR 1.1 Adobe AIR AIR SQLite SQLError.detailID SQLError.detailArguments Capabilities.languages UI HTML Mac (CA) Microsoft Windows XP Tablet PC Edition Windows Vista Home Premium Business Ultimate Enterprise 64 File.spaceAvailable API NativeWindow.supportsTransparency AIR 1.1 Adobe AIR 1.1 ( AIR 1.5 Adobe AIR 1.5 Flash Player 10 API API (RTMFP)

16 Adobe AIR 8 3D Speex AIR 1.5 AIR 1.5 AIR 179 Adobe AIR WebKit SquirrelFish JavaScript XML API XML AIR 1.5 Adobe AIR 1.5 (

17 9 4 : AIR Adobe AIR ActionScript 3.0 ActionScript 3.0 AIR Flash Adobe AIR Flash ActionScript Adobe AIR ( Adobe Adobe AIR Flash Adobe ( Adobe Adobe

18 10 5 : Flash CS3 CS4 AIR Adobe AIR Adobe Flash CS3 Professional Hello World AIR Flash CS3 Adobe AIR Flash CS3 Adobe AIR 3 Adobe AIR Flash CS3 Adobe Flash CS4 Professional Adobe AIR Flash Hello World Flash Adobe AIR FLA Flash (Adobe AIR) AIR Flash CS3 Flash CS4 Hello World Hello World 1 Flash 2 Flash (Adobe AIR) Adobe AIR FLA 3 Flash CS3 Adobe AIR Flash CS Hello World 6 helloair 1 Ctrl + Enter -> Adobe AIR 2 ActionScript trace trace("running AIR application using Debug Movie"); 3 Ctrl + Shift + Enter ->

19 Flash CS3 CS4 AIR 11 4 > AIR - AIR - Flash CS4 > AIR 5 Adobe AIR a b... c / d 1024-RSA RSA 2048 e f g... C:/Temp/mycert.pfx Flash c Adobe AIR 19 6 AIR AIR SWF application.xml 7 AIR (application.air) 8

20 Flash CS3 CS4 AIR Hello World FLA Adobe AIR FLA AIR 13 Adobe AIR Flash CS4 Flash Adobe AIR

21 13 6 : Flash CS3 Professional Adobe AIR Adobe Flash CS3 Professional Adobe AIR Flash Adobe AIR Adobe AIR Adobe AIR FLA Adobe Flash CS4 Professional AIR Flash Adobe AIR Adobe AIR ActionScript 3.0 API ActionScript 3.0 Adobe AIR ActionScript API 45 Adobe AIR air.net ServiceMonitorShim import ActionScript 3.0 import air.net.*; Adobe AIR Flash Flash (Adobe AIR) Flash (ActionScript 3.0) Adobe AIR > Adobe AIR FLA Adobe AIR 13 Adobe AIR 1 Flash Flash Flash > 2 Flash (Adobe AIR) Adobe AIR Adobe AIR Flash AIR Flash (ActionScript 3.0) Flash (Adobe AIR) Adobe AIR 1 Flash Flash (Adobe AIR) 2 > Flash Adobe AIR Adobe AIR Adobe AIR 1.0 ActionScript ActionScript 3.0 AIR SWF Flash FLA Flash AIR

22 Flash CS3 Professional Adobe AIR 14 Flash FLA Flash AIR 1 FLA > FLA 2 > 3 Flash Adobe AIR 1.0 ActionScript 3.0 AIR ActionScript FLA Adobe AIR 4 Adobe AIR 1 Adobe AIR 1.0 Flash AIR playerglobal.swc AIR playerglobal.swc ActionScript AIR API Adobe AIR 1 Adobe Flash Player 9 Flash Flash Player 9 playerglobal.swc Adobe AIR 1 Flash Player 9 Flash Flash FLA Flash AIR 1 Flash FLA 2 Flash (ActionScript 3.0) 3 > AIR - Adobe AIR 4 FLA Adobe AIR AIR - AIR - 15 AIR AIR FLA AIR Adobe AIR Flash AIR SWF AIR 1 Adobe AIR 13 Adobe AIR 2 > Ctrl+Enter AIR - Flash SWF (swfname-app.xml) AIR - Adobe AIR Adobe AIR SWF Flash Player 9 ActionScript 3.0 SWF 1 Adobe AIR

23 Flash CS3 Professional Adobe AIR 15 2 ActionScript > trace() trace("my application is running"); 3 > Ctrl+Shift+Enter Flash ActionScript SWF AIR - Flash SWF (swfname-app.xml) AIR - > Ctrl+Shift+Enter ActionScript Flash AIR AIR Adobe AIR Flash AIR - AIR - AIR AIR AIR - AIR AIR (.air) Adobe AIR 1 Flash Adobe AIR 2 AIR - Adobe AIR FLA 3 > AIR - 4 AIR - AIR AIR FLA SWF AIR Flash AIR - AIR - SWF SWF ID ID ID ID 0-9 a-z A-Z com.adobe.example.application_name ( ) ( )

24 Flash CS3 Professional Adobe AIR 16 FLA Adobe AIR AIR AIR AIR - PNG Adobe AIR 128x128 48x48 32x32 16x16 Adobe AIR AIR - HTML

25 Flash CS3 Professional Adobe AIR 17 AIR (+) (-) (-) (-) 17 X Y true true true true AIR AIR AIR AIR 272 AIR (+) Flash Flash html txt xmpl 39 (A-Za-z0-9) Adobe MIME 128x128 48x48 32x32 16x16 AIR

26 Flash CS3 Professional Adobe AIR 18 PNG application_name-app.xml Flash 18 AIR - Adobe AIR Flash Adobe AIR 19 AIR FLA.air / (+) (-) SWF Adobe AIR FLA Flash SWF ID ID a-z A-Z. - AIR Adobe AIRI XML id = com.adobe.example.swfname filename = swfname

27 Flash CS3 Professional Adobe AIR 19 name = swfname version = 1.0 description = blank copyright = blank initialwindow title = name content = swfname.swf systemchrome = standard, type = normal transparent = false visible = true icon image128x128 = icons/airapp_128.png image48x48 = icons/airapp_48.png image32x32 = icons/airapp_32.png image16x16 = icons/airapp_16.png customupdateui = false allowbrowserinvocation = false 37 AIR Adobe AIR Flash Adobe AIR Adobe AIR AIRI Adobe AIR 1 AIR - Adobe AIR AIRI AIR

28 Flash CS3 Professional Adobe AIR 20 AIR AIR 266 AIR 1 2 / RSA RSA Flash 266 AIR AIR Intermediate (AIRI) AIRI AIRI AIRI

29 21 7 : AIR AIR AIR AIR AIR Adobe AIR Adobe Flash Player AIR SWF JavaScript HTML AIR AIR air AIR Adobe AIR AIR AIR AIR SWF Flash Player Mac OS /Library/Frameworks/ Windows C:\Program Files\Common Files\Adobe AIR Linux /opt/adobe AIR/ Mac OS Windows Linux Web 259 AIR Adobe AIR SWF SWF SWF

30 AIR 22 AIR HTML AIR AIR 259 AIR AIR AIR AIR Web AIR AIR AIR AIR AIR 1 2 Mac OS ~/Applications/ Windows XP C:\Program Files\ Windows Vista ~/Apps/ Linux /opt/ installfolder AIR AIR AIR Windows AIR AIR exe Linux AIR AIR bin Mac OS AIR app Finder AIR app AIR Windows.exe Linux.bin Mac OS.app

31 AIR 23 AIR AIR app-storage:/ app-storage:/ Mac OS <appdata>/<appid>/local Store/ <appdata> /Users/<user>/Library/Preferences Windows <appdata>\<appid>\local Store\ <appdata> CSIDL_APPDATA C:\Documents and Settings\<user>\Application Data Linux <appdata>/<appid>/local Store/ <appdata> /home/<user>/.appdata air.file.applicationstoragedirectory File resolvepath() 90 Adobe AIR AIR AIR AIR API Updater.update() AIR AIR AIR AIR AIR Windows / Mac OS app AIR AIR AIR Adobe AIR AIR Windows / Adobe AIR Mac OS Applications Adobe AIR Uninstaller Windows Windows AIR Windows HKLM\Software\Policies\Adobe\AIR

32 AIR 24 AppInstallDisabled UntrustedAppInstallDisabled AIR 0 1 AIR 266 AIR 0 1 UpdateDisabled 0 1 AIR AIR AIR Flash Player Flash Player Internet URL AIR SWF AIR Internet URL Flash Player Flash Player Internet AIR SWF Internet SWF JavaScript Internet AIR Flash Player ActionScript 3.0 ( Flash Player Flash Player 9 ( Flash Player 10 ( AIR app:/ URL 254 URL AIR URL AIR

33 AIR 25 AIR AIR Internet HTML SWF AIR API air.nativeapplication.nativeapplication.applicationdescriptor API FileStream Adobe AIR ActionScript 3.0 ActionScript API AIR API SecurityError HTML HTMLLoader AIR JavaScript API AIRAliases.js window.runtime air HTML window.runtime AIR API JavaScript HTML HTML API eval() 27 ActionScript img SWF ActionScript TextField HTML img asfunction ActionScript 2.0 HTML asfunction SWF Flash Player 9 Update 3 Flash Player Adobe SWF Internet Flash Player JavaScript HTML JavaScript eval() JavaScript JavaScript window.runtime AIR API XMLHttpRequest frame iframe allowcrossdomainxhr 30 JavaScript window.open() 30 JavaScript window.open()

34 AIR CSS frame iframe img HTML URL CSS frame iframe img HTML URL CSS frame iframe img HTML HTML JavaScript JavaScript HTML JavaScript SWF 24 iframe frame frame iframe AIR HTML iframe frame 195 JavaScript HTML Frame iframe AIR HTML Frame AIR HTML HTML HTML frame iframe AIR Web frame iframe frame cookie AIR HTML AIR HTML load AIR eval() HTML frame iframe eval() JavaScript JavaScript 27 AIR HTML AIR frame AIR sandboxroot documentroot HTML frame iframe sandboxroot documentroot frame URL file: http: https: URL frame URL file: app: app-storage: URL sandbox

35 AIR 27 <iframe src="ui.html" sandboxroot=" documentroot="app:/sandbox/"> </iframe> frame AIR childsandboxbridge parentsandboxbridge frame window frame childsandboxbridge childsandboxbridge frame frame childsandbox frame frame frame frame var interface = ; interface.calculateprice = function() return ; interface.storeid = "abc" window.childsandboxbridge = interface; ID "child" iframe frame childsandboxbridge var childinterface = document.getelementbyid("child").childsandboxbridge; air.trace(childinterface.calculateprice()); //traces "1.65" air.trace(childinterface.storeid)); //traces "abc" parentsandboxbridge parentsandboxbridge frame frame frame parentsandbox frame frame frame frame save var interface = ; interface.save = function(text) var savefile = air.file("app-storage:/save.txt"); //write text to file document.getelementbyid("child").parentsandboxbridge = interface; frame save.txt save var texttosave = "A string."; window.parentsandboxbridge.save(texttosave); parentsandboxbridge SecurityError childsandboxbridge SecurityError 26 HTML HTML JavaScript API Adobe AIR runtime security violation for JavaScript code in the application security sandbox JavaScript Adobe AIR 195 JavaScript

36 AIR 28 JavaScript eval() HTML body onload onload API DOM innerhtml (JavaScript) DOM JavaScript eval() onload eval() eval() eval("null"); eval("3 +.14"); eval("'foo'"); prop1: val1, prop2: val2 setter/getter get prop1()..., set prop1(v)... [ val1, val2, val3 ] a.b.c onload onload eval("alert(44)"); eval("myfunction(44)"); eval("nativeapplication.applicationid"); eval() eval() innerhtml DOM script innerhtml DOM script src script src JavaScript javascript URL href="javascript:alert('test')" setinterval() settimout() settimeout('x = 4', 1000) document.write() document.writeln()

37 AIR 29 eval() JSON JSON JavaScript JSON Ajax JavaScript Adobe Ajax JavaScript eval() AIR API JavaScript window.runtime AIR API TypeError try window.runtime.flash.system.nativeapplication.nativeapplication.exit(); catch (e) alert(e); TypeError window.runtime 34 XMLHttpRequest HTML XMLHttpRequest HTML onload HTML JavaScript XMLHttpRequest frame iframe allowcrosscomainxhr frame iframe Javascript XMLHttpRequest <iframe id="ui" src=" sandboxroot=" allowcrossdomainxhr="true" documentroot="app:/"> </iframe> 30 CSS frame iframe img HTML URL CSS frame iframe img HTML CSS frame iframe img

38 AIR 30 JavaScript window.open() JavaScript window.open() JavaScript window.open() window.open() settimeout() window.open() window.open() 24 window.open() window.open() JavaScript Adobe AIR runtime security violation for JavaScript code in the application security sandbox JavaScript Adobe AIR 195 JavaScript HTML HTMLLoader loadstring() HTML Internet HTML loadstring() HTML AIR API HTMLLoader placeloadstringcontentinapplicationsandbox true loadstring() HTML 194 HTML AIR AIR AIR Security.allowDomain() LoaderContext.securityDomain LoaderContext.applicationDomain AIR AIR parentsandboxbridge

39 AIR 31 childsandboxbridge parentsandboxbridge SecurityError childsandboxbridge SecurityError (SWF) AIR SWF SWF StoreAPI StoreAPI Loader SWF LoaderInfo parentsandboxbridge AIR <?xml version="1.0" encoding="utf-8"?> <mx:windowedapplication xmlns:mx=" layout="absolute" title="music Store" creationcomplete="initapp()"> <mx:script> import flash.display.loader; import flash.net.urlrequest; private var child:loader; private var issale:boolean = false; private function initapp():void var request:urlrequest = new URLRequest(" child = new Loader(); child.contentloaderinfo.parentsandboxbridge = new StoreAPI(this); child.load(request); container.addchild(child); public function getregularalbumprice():string return "$11.99"; public function getsalealbumprice():string return "$9.99"; public function getalbumprice():string if(issale) return getsalealbumprice(); else return getregularalbumprice(); </mx:script> <mx:uicomponent id="container" /> </mx:windowedapplication> StoreAPI getsalealbumprice() Not available StoreAPI

40 AIR 32 public class StoreAPI private static var musicstore:object; public function StoreAPI(musicStore:Object) this.musicstore = musicstore; public function getregularalbumprice():string return musicstore.getregularalbumprice(); public function getsalealbumprice():string return "Not available"; public function getalbumprice():string return musicstore.getregularalbumprice(); PriceQuoter SWF package import flash.display.sprite; import flash.system.security; import flash.text.*; public class PriceQuoter extends Sprite private var storerequester:object; public function PriceQuoter() trace("initializing child SWF"); trace("child sandbox: " + Security.sandboxType); storerequester = loaderinfo.parentsandboxbridge; var tf:textfield = new TextField(); tf.autosize = TextFieldAutoSize.LEFT; addchild(tf); tf.appendtext("store price of album is: " + storerequester.getalbumprice()); tf.appendtext("\n"); tf.appendtext("sale price of album is: " + storerequester.getsalealbumprice()); (HTML) HTML parentsandboxbridge childsandboxbridge JavaScript window HTML 207

41 AIR 33 API API readfile(path:string) readapplicationsetting() API Web Web Web Flash Player SWF Cookie AIR 34 AIR URL URL app:/ app-storage:/ file:/// AIR app: URL AIR app-storage:/ app-storage:/ Mac OS <appdata>/<appid>/local Store/ <appdata> /Users/<user>/Library/Preferences Windows <appdata>\<appid>\local Store\ <appdata> CSIDL_APPDATA C:\Documents and Settings\<userName>\Application Data Linux <appdata>/<appid>/local Store/ <appdata> /home/<user>/.appdata 34 AIR

42 AIR 34 Security.allowDomain() AIR Flash Player Flash Player local-trusted SWF System.allowDomain() SWF AIR application Security.allowDomain() AIR AIR SWF API SWF AIR 30 SWF Loader.loadBytes() SWF SWF AIR API loadbytes() SWF loadbytes() SWF AIR loadbytes() SWF AIR loadbytes() loadercontext allowloadbytescodeexecution true loadbytes() SWF var loader:loader = new Loader(); var loadercontext:loadercontext = new LoaderContext(); loadercontext.allowloadbytescodeexecution = true; loader.loadbytes(bytes, loadercontext); loadbytes() SWF LoaderContext allowloadbytescodeexecution false Loader SecurityError Adobe AIR API LoaderContext allowloadbytescodeexecution AIR Web AIR AIR

43 AIR 35 app-storage:/ AIR AIR SecurityError app:/ URL AIR API Loader.loadBytes() JavaScript eval() AIR URL EncryptedLocalStore

44 AIR 36 AIR (CA) AIR CA SDK adt Flash Flex Builder adt AIR 266 AIR 293 AIR

45 37 8 : AIR AIR AIR XML Adobe Flash CS3 Professional Adobe Flash CS4 Professional Adobe AIR AIR AIR (Commands) > AIR - Flash CS3 Flash CS4 AIR application.xml AIR <?xml version="1.0" encoding="utf-8"?> <application xmlns=" <id>com.example.helloworld</id> <version>2.0</version> <filename>hello World</filename> <name>example Co. AIR Hello World</name> <description> <text xml:lang="en">this is a example.</text> <text xml:lang="fr">c'est un exemple.</text> <text xml:lang="es">esto es un ejemplo.</text> </description> <copyright>copyright (c) 2006 Example Co.</copyright> <initialwindow> <title>hello World</title> <content> HelloWorld-debug.swf </content> <systemchrome>none</systemchrome> <transparent>true</transparent> <visible>true</visible> <minimizable>true</minimizable> <maximizable>false</maximizable> <resizable>false</resizable> <width>640</width> <height>480</height> <minsize> </minSize> <maxsize> </maxSize> </initialwindow> <installfolder>example Co/Hello World</installFolder> <programmenufolder>example Co</programMenuFolder> <icon> <image16x16>icons/smallicon.png</image16x16> <image32x32>icons/mediumicon.png</image32x32>

46 AIR 38 <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> XML AIR AIR UI SWF AIR application AIR <application xmlns=" xmlns AIR XML AIR 1.5 AIR 1.5 AIR 1.5 (" SWF AIR SWF AIR 1.0 AIR 1.1 SWF9 (Flash Player 9) AIR 1.5 AIR 1.5 SWF9 SWF10 (Flash Player 10) SWF AIR Flash Player API SWF9 AIR 1.5 AIR 1.1 Flash Player 9 APIAIR 1.5 Flash Player 10 API API HTML AIR Flash Player API HTML CSS JavaScript AIR Webkit

47 AIR 39 AIR SWF AIR Flash Player API API, SWF, HTML SWF SWF HTML <script> SWF HTML AIR Flash Player API flash.display.loader SWF HTML <object> <embed> JavaScript API SWF API SWF SWF SWF SWF9 SWF10 - AIR 1.5 Flash Player 10 API SWF10 SWF9 - AIR 1.5 Flash Player 10 API minimumpatchlevel minimumpatchlevel Adobe AIR AIR AIR AIR API minimumpatchlevel AIR minimumpatchlevel <application xmlns=" minimumpatchlevel="5331"> ID <id>com.example.samples.testapp</id> <version>2.0</version> <filename>testapp</filename> <name> <text xml:lang="en">hello AIR</text> <text xml:lang="fr">bonjour AIR</text> <text xml:lang="es">hola AIR</text> </name> <description>an MP3 player.</description> <copyright>copyright (c) 2008 YourCompany, Inc.</copyright> id ID 0-9 a - z A - Z.

48 AIR id DNS Java Mac OS X DNS AIR DNS version version AIR a filename AIR name filename filename Unicode (UTF-8) 0x00 - x1f * x2a " x22 : x3a > x3c < x3e? x3f \ x5c x7c filename name AIR text AIR <name>test Application</name> AIR 1.0 text AIR 1.1 name <name> <text xml:lang="en">hello AIR</text> <text xml:lang="fr">bonjour AIR</text> <text xml:lang="es">hola AIR</text> </name> xml:lang RFC4646 ( AIR name en en AIR en en-us en en-us en-us en-gb AIR en- US AIR name name AIR filename

49 AIR 41 name AIR AIR AIR name 284 AIR description AIR AIR <description>this is a sample AIR application.</description> AIR 1.0 text AIR 1.1 description <description> <text xml:lang="en">this is a example.</text> <text xml:lang="fr">c'est un exemple.</text> <text xml:lang="es">esto es un ejemplo.</text> </description> xml:lang RFC4646 ( AIR description en en AIR en en-us en en-us en-us en-gb AIR en-us AIR description 284 AIR copyright AIR Mac OS Mac OS Info.plist NSHumanReadableCopyright <installfolder>acme</installfolder> <programmenufolder>acme/applications</programmenufolder> installfolder 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>acme/power Tools</installFolder> installfolder Unicode (UTF-8) filename installfolder installfolder name

50 AIR 42 programmenufolder Windows Linux installfolder (/) AIR initialwindow content SWF HTML initialwindow <initialwindow> <content>airtunes.swf</content> <title>air Tunes</title> <systemchrome>none</systemchrome> <transparent>true</transparent> <visible>true</visible> <minimizable>true</minimizable> <maximizable>true</maximizable> <resizable>true</resizable> <width>400</width> <height>600</height> <x>150</x> <y>150</y> <minsize> </minSize> <maxsize> </maxSize> </initialwindow> initialwindow content content URL SWF HTML URL ADL AIR URL ADL root-dir content URL RFC 1738 URL %20 title systemchrome standard none transparent Alpha true systemchrome none transparent true visible true false activate() visible true 49 x y width height SWF HTML minsize maxsize minimizable maximizable resizable true Mac OS X maximizable resizable false

51 AIR 43 icon icon PNG <icon> <image16x16>icons/smallicon.png</image16x16> <image32x32>icons/mediumicon.png</image32x32> <image48x48>icons/bigicon.png</image48x48> <image128x128>icons/biggesticon.png</image128x128> </icon> AIR AIR customupdateui true <customupdateui>true</customupdateui> customupdateui true AIR AIR AIR ID ID ID AIR customupdateui customupdateui true UI 272 AIR Web AIR <allowbrowserinvocation>true</allowbrowserinvocation> false true AIR filetypes AIR AIR AIR NativeApplication.setAsDefaultApplication()

52 AIR 44 <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> filetypes filetype filetype name extension description contenttype AIR 1.5 AIR MIME MIME Linux icon AIR AIR AIR InvokeEvent AIR NativeApplication InvokeEvent

53 45 9 : Adobe AIR Adobe AIR Adobe Flash Player SWF AIR Adobe AIR SWF ApplicationUpdater ApplicationUpdaterUI BrowserInvokeEvent Clipboard ClipboardFormats ClipboardTransferMode CompressionAlgorithm DockIcon DownloadErrorEvent DRMAuthenticateEvent DRMErrorEvent DRMStatusEvent EncryptedLocalStore File FileListEvent FileMode FileStream FocusDirection HTMLHistoryItem HTMLHost HTMLLoader HTMLPDFCapability HTMLUncaughtScriptExceptionEvent HTMLWindowCreateOptions Icon InteractiveIcon air.update air.update flash.events flash.desktop flash.desktop flash.desktop flash.utils flash.desktop air.update.events flash.events flash.events flash.events flash.data flash.filesystem flash.events flash.filesystem flash.filesystem flash.display flash.html flash.html flash.html flash.html flash.events flash.html flash.desktop flash.desktop

54 Adobe AIR 46 InvokeEvent NativeApplication NativeDragActions NativeDragEvent NativeDragManager NativeDragOptions NativeMenu NativeMenuItem NativeWindow NativeWindowBoundsEvent NativeWindowDisplayState NativeWindowDisplayStateEvent NativeWindowInitOptions NativeWindowResize NativeWindowSystemChrome NativeWindowType NotificationType OutputProgressEvent RevocationCheckSettings Screen ScreenMouseEvent SignatureStatus SignerTrustSettings SQLCollationType SQLColumnNameStyle SQLColumnSchema SQLConnection SQLError SQLErrorEvent SQLErrorOperation SQLEvent SQLIndexSchema SQLResult SQLSchema flash.events flash.desktop flash.desktop flash.events flash.desktop flash.desktop flash.display flash.display flash.display flash.events flash.display flash.events flash.display flash.display flash.display flash.display flash.desktop flash.events flash.security flash.display flash.events flash.security flash.security flash.data flash.data flash.data flash.data flash.errors flash.events flash.errors flash.events flash.data flash.data flash.data

55 Adobe AIR 47 SQLSchemaResult SQLStatement SQLTableSchema SQLTransactionLockType SQLTriggerSchema SQLUpdateEvent SQLViewSchema StatusFileUpdateErrorEvent StatusFileUpdateEvent StatusUpdateErrorEvent StatusUpdateEvent SystemTrayIcon UpdateEvent Updater URLRequestDefaults XMLSignatureValidator flash.data flash.data flash.data flash.data flash.data flash.events flash.data air.update.events air.update.events air.update.events air.update.events flash.desktop air.update.events flash.desktop flash.net flash.utils flash.security IURIDereferencer AIR AIR SWF AIR Capabilities Event languages DISPLAYING EXITING HTML_BOUNDS_CHANGE HTML_DOM_INITIALIZE HTML_RENDER LOCATION_CHANGE NETWORK_CHANGE USER_IDLE USER_PRESENT FileReference uploadunencoded()

56 Adobe AIR 48 HTTPStatusEven t HTTP_RESPONSE_STATUS responseurl responseheaders KeyboardEvent commandkey controlkey LoaderContext LoaderInfo allowloadbytescodeexecution parentsandboxbridge childsandboxbridge NetStream resetdrmvouchers() setdrmauthenticationcredentials() URLRequest followredirects managecookies shouldauthenticate shouldcacheresponse useragent usercache setlogincredentials() URLStream Stage Security httpresponsestatus nativewindow APPLICATION AIR URLRequest ByteArray.compress() ByteArray.uncompress() algorithm deflate zlib AIR air.net Adobe AIR ServiceMonitor.swc ServiceMonitor SocketMonitor URLMonitor

57 49 10 : Adobe AIR API API Adobe AIR NativeWindow NativeWindowInitOptions Adobe Flash Adobe AIR AIR AIR AIR API Flash Flex HTML AIR Mac Apple Windows Microsoft Linux Flex Alpha AIR AIR API ActionScript NativeWindow API ActionScript Flash CS NativeWindow NativeWindow Flex mx:windowedapplication mx:window NativeWindow Flex Flex AIR WindowedApplication Application Flex

58 50 HTML JavaScript Window Web JavaScript Window ActionScript NativeWindow Flash Player NativeWindow Flex Framework Flex Framework NativeWindow API mx:windowedapplication mx:window Flash CS AIR HTML HTML HTML CSS JavaScript HTML HTML DOM HTML NativeWindow AIR HTML nativewindow NativeWindow NativeWindow JavaScript Window moveto() close() AIR AIR initialwindow SWF AIR NativeWindow SWF HTML AIR HTML HTML 37 API

59 51 flash.display NativeWindow NativeWindowInitOptions NativeWindowDisplayState NativeWindowResize NativeWindowSystemChrome NativeWindowType NativeWindowDisplayState NativeWindowResize NativeWindowSystemChrome NativeWindowType flash.events NativeWindowBoundsEvent NativeWindowDisplayStateEvent 1 NativeWindow displaystatechanging 2 3 NativeWindow displaystatechange NativeWindow a b move resize NativeWindow dispatchevent() API ActionScript 3.0 ( Flash Adobe ActionScript 3.0 (

60 52 type systemchrome transparent window NativeWindowInitOptions AIR type normal transparent true type lightweight systemchrome standard AIR NativeWindowType AIR Normal Utility Lightweight Windows Mac OS X Windows Mac OS X Windows Mac OS X Windows (Alt+Space) type systemchrome none systemchrome standard none standard none NativeWindowSystemChrome transparent false type normal utility Alpha transparent true transparent Alpha Alpha

61 53 Linux Mac OS X Windows HTML SWF PDF 216 HTML SWF PDF NativeWindow.supportsTransparency false Mac Windows Linux HTML HTML HTMLLoader HTML HTML paintsdefaultbackground false HTMLLoader var html:htmlloader = new HTMLLoader(); html.paintsdefaultbackground = false; JavaScript HTML window.htmlloader.paintsdefaultbackground = false; HTML PNG Mac OS X Windows Linux

62 54 Mac OS X Microsoft Windows Linux * Type normal SystemChrome standard Transparent false Type utility SystemChrome standard Transparent false Type Any SystemChrome none Transparent false Type Any SystemChrome none Transparent true mxwindowedapplication mx:window Type Any SystemChrome none Transparent true * Ubuntu Compiz

63 55 AIR Mac OS X Mac OS X Windows AIR NativeWindow HTML HTMLLoader createrootwindow() HTML JavaScript window.open() systemchrome type transparent maximizable minimizable resizable standard normal false true true true AIR AIR type normal visible width height NativeWindowInitOptions HTML NativeWindowInitOptions NativeWindow HTMLLoader createrootwindow() NativeWindowInitOptions var options:nativewindowinitoptions = new NativeWindowInitOptions(); options.systemchrome = NativeWindowSystemChrome.STANDARD; options.type = NativeWindowType.UTILITY options.transparent = false; options.resizable = false; options.maximizable = false; transparent true type lightweight systemchrome standard JavaScript window.open() HTMLHost 222 window.open() JavaScript AIR SWF HTML AIR Flash SWF AIR SWF ActionScript Stage nativewindow NativeWindow

64 56 Flash FLA import flash.display.nativewindow; var mainwindow:nativewindow = this.stage.nativewindow; mainwindow.maximize(); mainwindow.activate(); NativeWindow NativeWindow NativeWindowInitOptions NativeWindow var options:nativewindowinitoptions = new NativeWindowInitOptions(); options.systemchrome = NativeWindowSystemChrome.STANDARD; options.transparent = false; var newwindow:nativewindow = new NativeWindow(options); visible true activate() Flash scalemode noscale StageScaleMode.NO_SCALE Flash AIR NativeWindow var maxossize:point = NativeWindow.systemMaxSize; var minossize:point = NativeWindow.systemMinSize; HTML HTML JavaScript Window.open() AIR HTMLLoader createrootwindow() HTML JavaScript Window.open() open() open() URL newwindow = window.open("xmpl.html", "logwindow", "height=600, width=400, top=10, left=10"); ActionScript HTMLHost JavaScript window.open() 219 HTMLHost HTMLLoader.createRootWindow() JavaScript 300x400 var options = new air.nativewindowinitoptions(); options.systemchrome = "none"; options.type = "lightweight"; var windowbounds = new air.rectangle(200,250,300,400); newhtmlloader = air.htmlloader.createrootwindow(true, options, true, windowbounds); newhtmlloader.load(new air.urlrequest("xmpl.html")); window AIR runtime nativewindow htmlloader

65 57 createrootwindow() JavaScript Window parent opener null createrootwindow() HTMLLoader Window newhtmlloader.window JavaScript Window JavaScript ActionScript createrootwindow() AIR HTML SWF Flash HTML JavaScript SWF HTML AIR app: URL AIR API AIR API JavaScript JavaScript Window runtime nativewindow htmlloader HTML 21 AIR SWF flash.display.loader Flash SWF package import flash.display.sprite; import flash.events.event; import flash.net.urlrequest; import flash.display.loader; public class LoadedSWF extends Sprite public function LoadedSWF() var loader:loader = new Loader(); loader.load(new URLRequest("visual.swf")); loader.contentloaderinfo.addeventlistener(event.complete,loadflash); private function loadflash(event:event):void addchild(event.target.loader); SWF HTML HTML SWF script Loader API ActionScript 1 2 SWF SWF SWF HTML NativeWindow HTML NativeWindow HTMLLoader HTML HTMLLoader HTMLLoader.createRootWindow() HTMLLoader 300 x 500 HTML

66 58 //newwindow is a NativeWindow instance var htmlview:htmlloader = new HTMLLoader(); html.width = 300; html.height = 500; //set the stage so display objects are added to the top-left and not scaled newwindow.stage.align = "TL"; newwindow.stage.scalemode = "noscale"; newwindow.stage.addchild( htmlview ); //urlstring is the URL of the HTML page to load htmlview.load( new URLRequest(urlString) ); transparent true HTMLLoader HTML SWF PDF SWF HTML HTML NativeWindow Flash HTML HTML window.nativewindow.stage addchild() addchild() HTML window.nativewindow.stage addchildat() index HTML HTML HTMLlLoader paintsdefaultbackground false body Flash HTML shape HTML shape enterframe <html> <head> <title>bouncers</title> <script src="airaliases.js" type="text/javascript"></script> <script language="javascript" type="text/javascript"> air.shape = window.runtime.flash.display.shape; function Bouncer(radius, color) this.radius = radius; this.color = color; //velocity this.vx = -1.3; this.vy = -1; //Create a Shape object and draw a circle with its graphics property this.shape = new air.shape(); this.shape.graphics.linestyle(1,0); this.shape.graphics.beginfill(this.color,.9); this.shape.graphics.drawcircle(0,0,this.radius); this.shape.graphics.endfill(); //Set the starting position this.shape.x = 100; this.shape.y = 100; //Moves the sprite by adding (vx,vy) to the current position this.update = function() this.shape.x += this.vx; this.shape.y += this.vy;

67 59 //Keep the sprite within the window if( this.shape.x - this.radius < 0) this.vx = -this.vx; if( this.shape.y - this.radius < 0) this.vy = -this.vy; if( this.shape.x + this.radius > window.nativewindow.stage.stagewidth) this.vx = -this.vx; if( this.shape.y + this.radius > window.nativewindow.stage.stageheight) this.vy = -this.vy; ; function init() //turn off the default HTML background window.htmlloader.paintsdefaultbackground = false; var bottom = new Bouncer(60,0xff2233); var top = new Bouncer(30,0x2441ff); //listen for the enterframe event window.htmlloader.addeventlistener("enterframe",function(evt) bottom.update(); top.update(); ); //add the bouncing shapes to the window stage window.nativewindow.stage.addchildat(bottom.shape,0); window.nativewindow.stage.addchild(top.shape); </script> <body onload="init();"> <h1>de Finibus Bonorum et Malorum</h1> <p>sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p> <p style="background-color:#ffff00; color:#660000;">this paragraph has a background color.</p> <p>at vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.</p> </body> </html> AIR JavaScript ActionScript ActionScript Adobe ActionScript 3.0

68 60 public function createnativewindow():void //create the init options var options:nativewindowinitoptions = new NativeWindowInitOptions(); options.transparent = false; options.systemchrome = NativeWindowSystemChrome.STANDARD; options.type = NativeWindowType.NORMAL; //create the window var newwindow:nativewindow = new NativeWindow(options); newwindow.title = "A title"; newwindow.width = 600; newwindow.height = 400; newwindow.stage.align = StageAlign.TOP_LEFT; newwindow.stage.scalemode = StageScaleMode.NO_SCALE; //activate and show the new window newwindow.activate(); NativeWindow NativeWindow var win:nativewindow = new NativeWindow(initOptions); nativewindow var win:nativewindow = stage.nativewindow; stage var win:nativewindow = displayobject.stage.nativewindow; target private function onnativewindowevent(event:nativewindowboundsevent):void var win:nativewindow = event.target as NativeWindow; HTML nativewindow var win:nativewindow = htmlloader.window.nativewindow; NativeApplication activewindow openedwindows var nativewin:nativewindow = NativeApplication.nativeApplication.activeWindow; var firstwindow:nativewindow = NativeApplication.nativeApplication.openedWindows[0]; NativeApplication.nativeApplication.activeWindow AIR null NativeApplication.nativeApplication.openedWindows AIR

69 61 NativeWindow activate() visible true activate() activate visible true visible false Mac OS X Mac OS X visible false AIR alwaysinfront true alwaysinfront false AIR alwaysinfront true AIR alwaysinfront NativeWindow alwaysinfront false false true true false ordertofront() orderinfrontof() ordertoback() orderbehind() activate() visible false Linux

70 62 alwaysinfront true alwaysinfront true NativeWindow.close() NativeWindow.close() close close NativeWindow IllegalOperationError closed NativeWindow.visible false Nativeapplication.autoExit true closing preventdefault() dispatchevent() public function onclosecommand(event:mouseevent):void var closingevent:event = new Event(Event.CLOSING,true,true); dispatchevent(closing); if(!closingevent.isdefaultprevented()) win.close(); preventdefault() dispatchevent() false false isdefaultprevented() NativeWindow maximize() mywindow.maximize(); NativeWindow minimize() mywindow.minimize(); NativeWindow restore() mywindow.restore(); AIR Mac OS X AIR Linux

71 63 maximizable minimizable Flash ActionScript NativeWindow minimize() maximize() restore() close() package import flash.display.sprite; import flash.events.mouseevent; import flash.text.textfield; public class MinimizeExample extends Sprite public function MinimizeExample():void var mintextbtn:textfield = new TextField(); mintextbtn.x = 10; mintextbtn.y = 10; mintextbtn.text = "Minimize"; mintextbtn.background = true; mintextbtn.border = true; mintextbtn.selectable = false; addchild(mintextbtn); mintextbtn.addeventlistener(mouseevent.click, onminimize); var maxtextbtn:textfield = new TextField(); maxtextbtn.x = 120; maxtextbtn.y = 10; maxtextbtn.text = "Maximize"; maxtextbtn.background = true; maxtextbtn.border = true; maxtextbtn.selectable = false; addchild(maxtextbtn); maxtextbtn.addeventlistener(mouseevent.click, onmaximize); var restoretextbtn:textfield = new TextField(); restoretextbtn.x = 230; restoretextbtn.y = 10; restoretextbtn.text = "Restore"; restoretextbtn.background = true; restoretextbtn.border = true; restoretextbtn.selectable = false; addchild(restoretextbtn); restoretextbtn.addeventlistener(mouseevent.click, onrestore); var closetextbtn:textfield = new TextField(); closetextbtn.x = 340; closetextbtn.y = 10; closetextbtn.text = "Close Window"; closetextbtn.background = true; closetextbtn.border = true; closetextbtn.selectable = false; addchild(closetextbtn);

72 64 closetextbtn.addeventlistener(mouseevent.click, onclosewindow); function onminimize(event:mouseevent):void this.stage.nativewindow.minimize(); function onmaximize(event:mouseevent):void this.stage.nativewindow.maximize(); function onrestore(event:mouseevent):void this.stage.nativewindow.restore(); function onclosewindow(event:mouseevent):void this.stage.nativewindow.close(); NativeWindow 60 NativeWindow NativeWindow startresize() mousedown mouseup startresize() width height bounds Linux Y Y Linux Web scalemode StageScaleMode.NO_SCALE scalex scaley NativeWindow startmove() startresize() mousedown startmove() mouseup startresize startmove ActionScript 3.0 (

73 65 package import flash.display.sprite; import flash.events.mouseevent; import flash.display.nativewindowresize; public class NativeWindowResizeExample extends Sprite public function NativeWindowResizeExample():void // Fills a background area. this.graphics.beginfill(0xffffff); this.graphics.drawrect(0, 0, 400, 300); this.graphics.endfill(); // Creates a square area where a mouse down will start the resize. var resizehandle:sprite = createsprite(0xcccccc, 20, this.width - 20, this.height - 20); resizehandle.addeventlistener(mouseevent.mouse_down, onstartresize); // Creates a square area where a mouse down will start the move. var movehandle:sprite = createsprite(0xcccccc, 20, this.width - 20, 0); movehandle.addeventlistener(mouseevent.mouse_down, onstartmove); public function createsprite(color:int, size:int, x:int, y:int):sprite var s:sprite = new Sprite(); s.graphics.beginfill(color); s.graphics.drawrect(0, 0, size, size); s.graphics.endfill(); s.x = x; s.y = y; this.addchild(s); return s; public function onstartresize(event:mouseevent):void this.stage.nativewindow.startresize(nativewindowresize.bottom_right); public function onstartmove(event:mouseevent):void this.stage.nativewindow.startmove(); closing mywindow.addeventlistener(event.closing, onclosingevent); target closing close

74 66 closing window close() closing close closing window dispatchevent() Event activate deactivate closing close Mac OS X Quit NativeWindowBoundsEvent moving move resizing resize NativeWindowBoundsEvent beforebounds afterbounds NativeWindowDisplayStateEvent displaystatechanging displaystatechange NativeWindowDisplayStateEvent beforedisplaystate afterdisplaystate Linux Stage displaystate StageDisplayState.FULL_SCREEN_INTERACTIVE SWF Esc Linux Flash ActionScript

75 67 import flash.display.sprite; import flash.display.stagedisplaystate; import flash.text.textfield; import flash.text.textformat; public class FullScreenTerminalExample extends Sprite public function FullScreenTerminalExample():void var terminal:textfield = new TextField(); terminal.multiline = true; terminal.wordwrap = true; terminal.selectable = true; terminal.background = true; terminal.backgroundcolor = 0x ; this.stage.displaystate = StageDisplayState.FULL_SCREEN_INTERACTIVE; addchild(terminal); terminal.width = 550; terminal.height = 400; terminal.text = "Welcome to the dumb terminal application. Press the ESC key to exit.\n_"; var tf:textformat = new TextFormat(); tf.font = "Courier New"; tf.color = 0x00CCFF00; tf.size = 12; terminal.settextformat(tf); terminal.setselection(terminal.text.length - 1, terminal.text.length);

76 68 11 : Adobe AIR Screen Screen Adobe AIR Screen Adobe Flash Adobe AIR AIR API Screen AIR Screen

77 69 (#1) (0,0) #2 #1 API ActionScript 3.0 ( Screen.screens Screen.mainScreen Screen.getScreensForRectangle() Screen Screen Mac OS X Windows Screen Screen API screens Screen.getScreensForRectangle()

78 70 package import flash.display.sprite; import flash.display.screen; import flash.events.keyboardevent; import flash.ui.keyboard; import flash.display.stagealign; import flash.display.stagescalemode; public class ScreenExample extends Sprite public function ScreenExample() stage.align = StageAlign.TOP_LEFT; stage.scalemode = StageScaleMode.NO_SCALE; stage.addeventlistener(keyboardevent.key_down,onkey); private function onkey(event:keyboardevent):void if(screen.screens.length > 1) switch(event.keycode) case Keyboard.LEFT : moveleft(); break; case Keyboard.RIGHT : moveright(); break; case Keyboard.UP : moveup(); break; case Keyboard.DOWN : movedown(); break; private function moveleft():void var currentscreen = getcurrentscreen(); var left:array = Screen.screens; left.sort(sorthorizontal); for(var i:int = 0; i < left.length - 1; i++) if(left[i].bounds.left < stage.nativewindow.bounds.left) stage.nativewindow.x += left[i].bounds.left - currentscreen.bounds.left; stage.nativewindow.y += left[i].bounds.top - currentscreen.bounds.top; private function moveright():void var currentscreen:screen = getcurrentscreen(); var left:array = Screen.screens; left.sort(sorthorizontal); for(var i:int = left.length - 1; i > 0; i--) if(left[i].bounds.left > stage.nativewindow.bounds.left) stage.nativewindow.x += left[i].bounds.left - currentscreen.bounds.left; stage.nativewindow.y += left[i].bounds.top - currentscreen.bounds.top;

79 71 private function moveup():void var currentscreen:screen = getcurrentscreen(); var top:array = Screen.screens; top.sort(sortvertical); for(var i:int = 0; i < top.length - 1; i++) if(top[i].bounds.top < stage.nativewindow.bounds.top) stage.nativewindow.x += top[i].bounds.left - currentscreen.bounds.left; stage.nativewindow.y += top[i].bounds.top - currentscreen.bounds.top; break; private function movedown():void var currentscreen:screen = getcurrentscreen(); var top:array = Screen.screens; top.sort(sortvertical); for(var i:int = top.length - 1; i > 0; i--) if(top[i].bounds.top > stage.nativewindow.bounds.top) stage.nativewindow.x += top[i].bounds.left - currentscreen.bounds.left; stage.nativewindow.y += top[i].bounds.top - currentscreen.bounds.top; break; private function sorthorizontal(a:screen,b:screen):int if (a.bounds.left > b.bounds.left) return 1; else if (a.bounds.left < b.bounds.left) return -1; else return 0; private function sortvertical(a:screen,b:screen):int if (a.bounds.top > b.bounds.top) return 1; else if (a.bounds.top < b.bounds.top) return -1; else return 0; private function getcurrentscreen():screen var current:screen; var screens:array = Screen.getScreensForRectangle(stage.nativeWindow.bounds); (screens.length > 0)? current = screens[0] : current = Screen.mainScreen; return current;

80 72 12 : API API Adobe AIR AIR NativeMenu NativeMenuItem Adobe Flash Adobe AIR AIR AIR NativeMenu Mac OS X Windows Linux AIR Adobe AIR flash.display NativeMenu NativeMenuItem flash.ui ContextMenu ContextMenuItem flash.events Event ContextMenuEvent

81 73 AIR Mac OS X Windows Linux Mac OS X AIR API NativeMenu NativeWindow menu Windows Linux Mac OS X SWF HTML NativeMenu ContextMenu HTML Webkit HTML JavaScript API HTML Mac OS X Windows Linux NativeMenu Mac OS X Windows Linux AIR NativeMenu display() Flash HTML MXML ActionScript JavaScript AIR AIR Mac OS X Mac OS X HTML TextField TextField NativeMenu NativeMenuItem NativeMenuItem NativeMenu

82 74 File Edit File Open Recent Edit NativeMenu NativeMenuItem NativeMenu NativeMenuItem NativeMenuItem NativeMenuItem NativeMenu NativeMenuItem NativeMenuItem NativeMenuItem GreatGatsby.pdf WarAndPeace.pdf Iliad.pdf NativeMenuItem NativeMenu NativeMenuItem NativeMenuItem NativeMenuItem NativeMenuItem NativeMenu NativeMenuItem NativeMenuItem NativeMenu NativeMenuItem NativeMenuItem submenu NativeMenu 82 NativeMenu NativeMenuItem displaying select Displaying displaying displaying Open Recent displaying target currenttarget displaying Select select select

83 75 select select select target currenttarget ContextMenu ContextMenuItem menuitemselect menuselect select displaying select keyequivalent Shift Mac OS X Command (Keyboard.COMMAND) Windows Linux Ctrl (Keyboard.CONTROL) keyequivalentmodifiers keyequivalent Shift Keyboard Windows Keyboard.COMMAND Ctrl Ctrl+Shift+G var item:nativemenuitem = new NativeMenuItem("Ungroup"); item.keyequivalent = "G"; Ctrl+Shift+G var item:nativemenuitem = new NativeMenuItem("Ungroup"); item.keyequivalent = "G"; item.keyequivalentmodifiers = [Keyboard.CONTROL]; Linux Mac OS X Windows Mac OS X Return mnemonicindex Windows Enter Linux mnemonicindex 0 r Format mnemonicindex 2 var item:nativemenuitem = new NativeMenuItem("Format"); item.mnemonicindex = 2;

84 76 checked enabled checked true var item:nativemenuitem = new NativeMenuItem("Format"); item.checked = true; enabled true false select var item:nativemenuitem = new NativeMenuItem("Format"); item.enabled = false; NativeMenuItem data Open Recent File var file:file = File.applicationStorageDirectory.resolvePath("GreatGatsby.pdf") var menuitem:nativemenuitem = docmenu.additem(new NativeMenuItem(file.name)); menuitem.data = file; AIR NativeMenu NativeMenu var root:nativemenu = new NativeMenu(); additemat() NativeApplication.nativeApplication.menu = root; Mac OS X NativeMenu NativeApplication menu nativewindowobject.menu = root; interactiveobject.contextmenu = root; DockIcon(NativeApplication.nativeApplication.icon).menu = root;

85 77 Mac OS X NativeMenu DockIcon menu SystemTrayIcon(NativeApplication.nativeApplication.icon).menu = root; root.display(stage, x, y); NativeMenuItem NativeMenu submenu AIR addsubmenu() var editmenuitem:nativemenuitem = root.addsubmenu(new NativeMenu(), "Edit"); submenu var editmenuitem:nativemenuitem = root.additem("edit", false); editmenuitem.submenu = new NativeMenu(); NativeMenuItem var copy:nativemenuitem = new NativeMenuItem("Copy", false); copy.addeventlistener(event.select, oncopycommand); editmenu.additem(copy); select select select NativeMenuItem isseparator true var separatora:nativemenuitem = new NativeMenuItem("A", true); editmenu.additem(separatora); SWF InteractiveObject contextmenu contextmenu NativeMenu ContextMenu ContextMenu ContextMenuItem ContextMenuEvent contextmenuowner mousetarget NativeMenuEvent Sprite

86 78 var sprite:sprite = new Sprite(); sprite.contextmenu = createcontextmenu() private function createcontextmenu():contextmenu var editcontextmenu:contextmenu = new ContextMenu(); var cutitem:contextmenuitem = new ContextMenuItem("Cut") cutitem.addeventlistener(contextmenuevent.menu_item_select, docutcommand); editcontextmenu.customitems.push(cutitem); var copyitem:contextmenuitem = new ContextMenuItem("Copy") copyitem.addeventlistener(contextmenuevent.menu_item_select, docopycommand); editcontextmenu.customitems.push(copyitem); var pasteitem:contextmenuitem = new ContextMenuItem("Paste") pasteitem.addeventlistener(contextmenuevent.menu_item_select, dopastecommand); editcontextmenu.customitems.push(pasteitem); return editcontextmenu private function docutcommand(event:contextmenuevent):voidtrace("cut"); private function docopycommand(event:contextmenuevent):voidtrace("copy"); private function dopastecommand(event:contextmenuevent):voidtrace("paste"); SWF AIR HTML HTML contextmenu contextmenu preventdefault() function showcontextmenu(event) event.preventdefault(); DHTML AIR display() HTML contextmenu

87 79 <html> <head> <script src="airaliases.js" language="javascript" type="text/javascript"></script> <script language="javascript" type="text/javascript"> function showcontextmenu(event) event.preventdefault(); contextmenu.display(window.nativewindow.stage, event.clientx, event.clienty); function createcontextmenu() var menu = new air.nativemenu(); var command = menu.additem(new air.nativemenuitem("custom command")); command.addeventlistener(air.event.select, oncommand); return menu; function oncommand() air.trace("context command invoked."); var contextmenu = createcontextmenu(); </script> </head> <body> <p oncontextmenu="showcontextmenu(event)" style="-khtml-user-select:auto;">custom context menu.</p> </body> </html> XML NativeMenu XML package import flash.display.nativemenu; import flash.display.nativemenuitem; import flash.events.event; public class DeclarativeMenu extends NativeMenu public function DeclarativeMenu(XMLMenuDefinition:XML):void super(); addchildrentomenu(this, XMLMenuDefinition.children()); private function addchildrentomenu(menu:nativemenu, children:xmllist):nativemenuitem var menuitem:nativemenuitem; var submenu:nativemenu; for each (var child:xml in children) if (String(child.@label).length > 0)

88 80 menuitem = new NativeMenuItem(child.@label); menuitem.name = child.name(); else menuitem = new NativeMenuItem(child.name()); menuitem.name = child.name(); menu.additem(menuitem); if (child.children().length() > 0) menuitem.submenu = new NativeMenu(); addchildrentomenu(menuitem.submenu,child.children()); return menuitem; //End class //End package XML var menudefinition:xml = <root> <FileMenu label='file'> <NewMenu label='new'> <NewTextFile label='text file'/> <NewFolder label='folder'/> <NewProject label='project'/> </NewMenu> <OpenCommand label='open'/> <SaveCommand label='save'/> </FileMenu> <EditMenu label='edit'> <CutCommand label='cut'/> <CopyCommand label='copy'/> <PasteCommand label='paste'/> </EditMenu> <FoodItems label='food Items'> <Jellyfish/> <Tripe/> <Gizzard/> </FoodItems> </root>; var test:declarativemenu = new DeclarativeMenu(menuDefinition); event.target.name display() NativeMenu popupmenu NativeMenu private function onmouseclick(event:mouseevent):void popupmenu.display(event.target.stage, event.stagex, event.stagey);

89 81 display() NativeMenu NativeMenuEvent.DISPLAYING NativeMenuEvent.SELECT NativeMenuItem NativeMenuEvent.SELECT NativeMenuEvent.DISPLAYING ContextMenu ContextMenuItem ContextMenuEvent.MENU_SELECT ContextMenuEvent.MENU_ITEM_SELECT NativeMenu.SELECT select NativeMenuItem var menucommandx:nativemenuitem = new NativeMenuItem("Command X"); menucommand.addeventlistener(event.select, docommandx) select select target

90 82 var colormenuitem:nativemenuitem = new NativeMenuItem("Choose a color"); var colormenu:nativemenu = new NativeMenu(); colormenuitem.submenu = colormenu; var red:nativemenuitem = new NativeMenuItem("Red"); var green:nativemenuitem = new NativeMenuItem("Green"); var blue:nativemenuitem = new NativeMenuItem("Blue"); colormenu.additem(red); colormenu.additem(green); colormenu.additem(blue); if(nativeapplication.supportsmenu) NativeApplication.nativeApplication.menu.addItem(colorMenuItem); NativeApplication.nativeApplication.menu.addEventListener(Event.SELECT, colorchoice); else if (NativeWindow.supportsMenu) var windowmenu:nativemenu = new NativeMenu(); this.stage.nativewindow.menu = windowmenu; windowmenu.additem(colormenuitem); windowmenu.addeventlistener(event.select, colorchoice); function colorchoice(event:event):void var menuitem:nativemenuitem = event.target as NativeMenuItem; trace(menuitem.label + " has been selected"); ContextMenuItem select menuitemselect menuitemselect displaying displaying 73 Windows Mac OS X MenuExample NativeWindow NativeApplication supportsmenu NativeWindow.supportsMenu true NativeMenu File Edit NativeApplication.supportsMenu true File Edit Mac OS X select select displaying Open Recent Documents displaying

91 83 package import flash.display.nativemenu; import flash.display.nativemenuitem; import flash.display.nativewindow; import flash.display.sprite; import flash.events.event; import flash.filesystem.file; import flash.desktop.nativeapplication; public class MenuExample extends Sprite private var recentdocuments:array = new Array(new File("app-storage:/GreatGatsby.pdf"), new File("app-storage:/WarAndPeace.pdf"), new File("app-storage:/Iliad.pdf")); public function MenuExample() var filemenu:nativemenuitem; var editmenu:nativemenuitem; if (NativeWindow.supportsMenu) stage.nativewindow.menu = new NativeMenu(); stage.nativewindow.menu.addeventlistener(event.select, selectcommandmenu); filemenu = stage.nativewindow.menu.additem(new NativeMenuItem("File")); filemenu.submenu = createfilemenu(); editmenu = stage.nativewindow.menu.additem(new NativeMenuItem("Edit")); editmenu.submenu = createeditmenu(); if (NativeApplication.supportsMenu) NativeApplication.nativeApplication.menu.addEventListener(Event.SELECT, selectcommandmenu); filemenu = NativeApplication.nativeApplication.menu.addItem(new NativeMenuItem("File")); filemenu.submenu = createfilemenu(); editmenu = NativeApplication.nativeApplication.menu.addItem(new NativeMenuItem("Edit")); editmenu.submenu = createeditmenu(); public function createfilemenu():nativemenu var filemenu:nativemenu = new NativeMenu(); filemenu.addeventlistener(event.select, selectcommandmenu); var newcommand:nativemenuitem = filemenu.additem(new NativeMenuItem("New")); newcommand.addeventlistener(event.select, selectcommand); var savecommand:nativemenuitem = filemenu.additem(new NativeMenuItem("Save")); savecommand.addeventlistener(event.select, selectcommand); var openrecentmenu:nativemenuitem = filemenu.additem(new NativeMenuItem("Open Recent")); openrecentmenu.submenu = new NativeMenu(); openrecentmenu.submenu.addeventlistener(event.displaying, updaterecentdocumentmenu); openrecentmenu.submenu.addeventlistener(event.select, selectcommandmenu); return filemenu; public function createeditmenu():nativemenu var editmenu:nativemenu = new NativeMenu(); editmenu.addeventlistener(event.select, selectcommandmenu);

92 84 var copycommand:nativemenuitem = editmenu.additem(new NativeMenuItem("Copy")); copycommand.addeventlistener(event.select, selectcommand); copycommand.keyequivalent = "c"; var pastecommand:nativemenuitem = editmenu.additem(new NativeMenuItem("Paste")); pastecommand.addeventlistener(event.select, selectcommand); pastecommand.keyequivalent = "v"; editmenu.additem(new NativeMenuItem("", true)); var preferencescommand:nativemenuitem = editmenu.additem(new NativeMenuItem("Preferences")); preferencescommand.addeventlistener(event.select, selectcommand); return editmenu; private function updaterecentdocumentmenu(event:event):void trace("updating recent document menu."); var docmenu:nativemenu = NativeMenu(event.target); for each (var item:nativemenuitem in docmenu.items) docmenu.removeitem(item); for each (var file:file in recentdocuments) var menuitem:nativemenuitem = docmenu.additem(new NativeMenuItem(file.name)); menuitem.data = file; menuitem.addeventlistener(event.select, selectrecentdocument); private function selectrecentdocument(event:event):void trace("selected recent document: " + event.target.data.name); private function selectcommand(event:event):void trace("selected command: " + event.target.label); private function selectcommandmenu(event:event):void if (event.currenttarget.parent!= null) var menuitem:nativemenuitem = finditemformenu(nativemenu(event.currenttarget)); if (menuitem!= null) trace("select event for \"" + event.target.label + "\" command handled by menu: " + menuitem.label);

93 85 else trace("select event for \"" + event.target.label + "\" command handled by root menu."); private function finditemformenu(menu:nativemenu):nativemenuitem for each (var item:nativemenuitem in menu.parent.items) if (item!= null) if (item.submenu == menu) return item; return null;

94 86 13 : Mac OS X Adobe AIR NativeApplication.nativeApplication.icon Adobe AIR DockIcon SystemTrayIcon Adobe Flash Adobe AIR AIR AIR NativeApplication.nativeApplication.icon DockIcon SystemTrayIcon NativeApplication.supportsDockIcon NativeApplication.supportsSystemTrayIcon AIR InteractiveIcon InteractiveIcon width height bitmaps DockIcon SystemTrayIcon NativeApplication.nativeApplication.icon.bitmaps bitmaps AIR NativeApplication.nativeApplication.icon.bitmaps = [bmp16x16.bitmapdata, bmp128x128.bitmapdata]; bitmaps enterframe timer Windows Linux Mac OS X bitmaps NativeApplication.nativeApplication.icon.bitmaps = []; AIR NativeApplication.supportsDockIcon true NativeApplication.nativeApplication.icon

95 87 AIR Mac OS X NativeMenu NativeApplication.nativeApplication.icon.menu NativeApplication.nativeApplication.icon.bounce() bounce() priority informational critical priority NotificationType NativeApplication invoke invoke NativeApplication.supportsSystemTrayIcon true AIR Windows Linux Windows Linux BitmapData bitmaps bitmaps bitmaps null NativeMenu NativeApplication.nativeApplication.icon.menu tooltip NativeApplication.nativeApplication.icon.tooltip = "Application name"; NativeApplication.nativeApplication.icon SystemTrayIcon click mousedown mouseup rightclick rightmousedown rightmouseup ScreenMouseEvent AIR

96 88 package import flash.display.loader; import flash.display.nativemenu; import flash.display.nativemenuitem; import flash.display.nativewindow; import flash.display.sprite; import flash.desktop.dockicon; import flash.desktop.systemtrayicon; import flash.events.event; import flash.net.urlrequest; import flash.desktop.nativeapplication; public class SysTrayApp extends Sprite public function SysTrayApp():void NativeApplication.nativeApplication.autoExit = false; var icon:loader = new Loader(); var iconmenu:nativemenu = new NativeMenu(); var exitcommand:nativemenuitem = iconmenu.additem(new NativeMenuItem("Exit")); exitcommand.addeventlistener(event.select, function(event:event):void NativeApplication.nativeApplication.icon.bitmaps = []; NativeApplication.nativeApplication.exit(); ); if (NativeApplication.supportsSystemTrayIcon) NativeApplication.nativeApplication.autoExit = false; icon.contentloaderinfo.addeventlistener(event.complete, iconloadcomplete); icon.load(new URLRequest("icons/AIRApp_16.png")); var systray:systemtrayicon = NativeApplication.nativeApplication.icon as SystemTrayIcon; systray.tooltip = "AIR application"; systray.menu = iconmenu; if (NativeApplication.supportsDockIcon) icon.contentloaderinfo.addeventlistener(event.complete,iconloadcomplete); icon.load(new URLRequest("icons/AIRApp_128.png")); var dock:dockicon = NativeApplication.nativeApplication.icon as DockIcon; dock.menu = iconmenu; stage.nativewindow.close(); private function iconloadcomplete(event:event):void NativeApplication.nativeApplication.icon.bitmaps = [event.target.content.bitmapdata]; icons AIRApp_16.png AIRApp_128.png AIR SDK

97 89 Window Mac OS X Microsoft Windows Linux Mac OS X 87 Windows Linux NativeWindow notifyuser() type NotificationType.CRITICAL NotificationType.INFORMATIONAL Linux notifyuser() stage.nativewindow.notifyuser(notificationtype.critical); NativeWindow.notifyUser() NativeWindow.supportsNotification Windows utility lightweight normal NativeApplication autoexit false <initalwindow> <visible>false</visible> visible true activate() NativeWindowInitOption type NativeWindowType.UTILITY NativeWindowType.LIGHTWEIGHT Mac OS X nativewindowdisplaystate visible false private function preventminimize(event:nativewindowdisplaystateevent):void if(event.afterdisplaystate == NativeWindowDisplayState.MINIMIZED) event.preventdefault(); event.target.visible = false; visible false Mac OS X

98 90 14 : Adobe AIR API AIR API API Adobe AIR File FileStream FileMode Adobe Flash Adobe AIR AIR AIR Adobe AIR flash.filesystem File File FileMode FileStream File file FileMode FileStream open() openasync() filemode filemode FileStream FileStream File FileStream File File.copyTo() File.copyToAsync() File.deleteDirectory() File.deleteDirectoryAsync() File.deleteFile() File.deleteFileAsync() File.getDirectoryListing() File.getDirectoryListingAsync() File.moveTo() File.moveToAsync() File.moveToTrash() File.moveToTrashAsync()

99 91 FileStream FileStream open() openasync() File FileStream addeventlistener() File File File FileReference Adobe Flash Player AIR FileReference File Flash Player SWF File File File FileStream File File File File File nativepath url Windows c:\sample directory\test.txt Mac OS /Sample directory/test.txt nativepath Windows (\) Mac OS Linux (/) file URL Windows file:///c:/sample%20directory/test.txt Mac OS file:///sample%20directory/test.txt file URL 95 URL File Mac OS Windows Linux

100 92 File File File Windows My Documents C:\Documents and Settings\userName\My Documents Mac OS Users/userName Linux /home/username File AIR Test var file:file = File.userDirectory.resolvePath("AIR Test"); File Windows C:\Documents and Settings\userName\My Documents Mac OS Users/userName/Documents Linux /home/username/documents File AIR Test var file:file = File.documentsDirectory.resolvePath("AIR Test"); File File AIR Test var file:file = File.desktopDirectory.resolvePath("AIR Test"); File AIR File prefs.xml var file:file = File.applicationStorageDirectory; file = file.resolvepath("prefs.xml"; ID ID Mac OS /Users/user name/library/preferences/applicationid.publisherid/local Store/ /Users/babbage/Library/Preferences/com.example.TestApp.02D88EEED35F84C264A EEA353A629FD.1/Loca l Store Windows Documents and Settings user name/application Data/applicationID.publisherID/Local Store/ C:\Documents and Settings\babbage\Application Data\com.example.TestApp.02D88EEED35F84C264A EEA353A629FD.1\Local Store Linux /home/user name/.appdata/applicationid publisherid/local Store/ /home/babbage/.appdata/com.example.testapp.02d88eeed35f84c264a eea353a629fd.1/local Store File.applicationStorageDirectory File URL url app-storage URL 95 URL

101 93 var dir:file = File.applicationStorageDirectory; dir = dir.resolvepath("preferences"); trace(dir.url); // app-storage:/preferences File File.applicationDirectory File images var dir:file = File.applicationDirectory; dir = dir.resolvepath("images"); File.applicationDirectory File URL url app URL 95 URL var dir:file = File.applicationDirectory; dir = dir.resolvepath("images"); trace(dir.url); // app:/images File.getRootDirectories() Windows C: Mac OS Linux / File nativepath File Windows var file:file = new File(); file.nativepath = "C:\\AIR Test\"; resolvepath() File AIR Test var file:file = File.userDirectory; file = file.resolvepath("air Test"); File url URL var urlstr:string = "file:///c:/air Test/"; var file:file = new File() file.url = urlstr; 95 File browsefordirectory() browsefordirectory() select cancel var file:file = new File(); file.addeventlistener(event.select, dirselected); file.browsefordirectory("select a directory"); function dirselected(e:event):void trace(file.nativepath);

102 94 InvokeEvent currentdirectory 243 File File resolvepath() File log.txt var file:file = File.applicationStorageDirectory; file = file.resolvepath("log.txt"); File url URL var urlstr:string = "file:///c:/air Test/test.txt"; var file:file = new File() file.url = urlstr; URL File() var urlstr:string = "file:///c:/air Test/test.txt"; var file:file = new File(urlStr); url URL URI %20 file.url = "file:///c:/air Test"; trace(file.url); // file:///c:/air%20test File nativepath Windows File C: AIR Test test.txt var file:file = new File(); file.nativepath = "C:/AIR Test/test.txt"; File() var file:file = new File("C:/AIR Test/test.txt"); Windows (/) (\) nativepath Mac OS Linux (/) nativepath var file:file = new File(/Users/dijkstra/AIR Test/test.txt"); 95 File getdirectorylisting() File 99 File browseforopen()

103 95 browseforsave() browseforopenmultiple() browseforsave() browseforopen() browseforsave() select browseforopen() browseforsave() File browseforopenmultiple() selectmultiple selectmultiple FileListEvent files File Open var filetoopen:file = File.documentsDirectory; selecttextfile(filetoopen); function selecttextfile(root:file):void var txtfilter:filefilter = new FileFilter("Text", "*.as;*.css;*.html;*.txt;*.xml"); root.browseforopen("open", [txtfilter]); root.addeventlistener(event.select, fileselected); function fileselected(event:event):void trace(filetoopen.nativepath); resolvepath() nativepath url File Windows var file1:file = File.documentsDirectory; file1 = file1.resolvepath("air Test"); trace(file1.nativepath); // C:\Documents and Settings\userName\My Documents\AIR Test var file2:file = File.documentsDirectory; file2 = file2.resolvepath(".."); trace(file2.nativepath); // C:\Documents and Settings\userName var file3:file = File.documentsDirectory; file3.nativepath += "/subdirectory"; trace(file3.nativepath); // C:\Documents and Settings\userName\My Documents\subdirectory var file4:file = new File(); file4.url = "file:///c:/air Test/test.txt"; trace(file4.nativepath); // C:\AIR Test\test.txt nativepath Windows (/) (\) Mac OS Linux (/) Windows URL File url URL

104 96 URL file file:///c:/air Test/test.txt URL file URL file://<host>/<path> <host> URL file URL (///) app application.xml images app:/images app-storage AIR settings prefs.xml app-storage:/settings/prefs.xml getrelativepath() var file1:file = File.documentsDirectory.resolvePath("AIR Test"); var file2:file = File.documentsDirectory file2 = file2.resolvepath("air Test/bob/test.txt"); trace(file1.getrelativepath(file2)); // bob/test.txt getrelativepath() usedotdot.. var file1:file = File.documentsDirectory; file1 = file1.resolvepath("air Test"); var file2:file = File.documentsDirectory; file2 = file2.resolvepath("air Test/bob/test.txt"); var file3:file = File.documentsDirectory; file3 = file3.resolvepath("air Test/susan/test.txt"); trace(file2.getrelativepath(file1, true)); //../.. trace(file3.getrelativepath(file2, true)); //../../bob/test.txt Windows Mac OS File File.documentsDirectory.resolvePath("test.txt"); File.documentsDirectory.resolvePath("TeSt.TxT"); AIR Test var file:file = File.documentsDirectory.resolvePath("AIR test"); trace(file.nativepath); //... AIR test file.canonicalize(); trace(file.nativepath); //... AIR Test canonicalize() nativepath Linux canonicalize() Windows canonicalize() 8.3

105 97 var path:file = new File(); path.nativepath = "C:\\AIR~1"; path.canonicalize(); trace(path.nativepath); // C:\AIR Test Mac OS Mac OS Finder Mac OS Linux Windows Vista Windows NTFS File issymboliclink true File ispackage issymboliclink File var desktopnodes:file = File.desktopDirectory.getDirectoryListing(); for (var i:uint = 0; i < desktopnodes.length; i++) if (desktopnodes[i].isdirectory &&!!desktopnodes[i].ispackage) trace(desktopnodes[i].name); var desktopnodes:file = File.desktopDirectory.getDirectoryListing(); for (var i:uint = 0; i < desktopnodes.length; i++) if (!desktopnodes[i].issymboliclink) trace(desktopnodes[i].name); canonicalize() var desktopnodes:file = File.desktopDirectory.getDirectoryListing(); for (var i:uint = 0; i < desktopnodes.length; i++) if (desktopnodes[i].issymboliclink) var linknode:file = desktopnodes[i] as File; linknode.canonicalize(); trace(linknode.nativepath); File spaceavailable File

106 98 trace(file.applicationstoragedirectory.spaceavailable); File spaceavailable File spaceavailable File spaceavailable 0 File spaceavailable 102 File File.lineEnding File.separator File.systemCharset Mac OS Linux Windows Mac OS Linux (/) Windows (\) Capabilities Capabilities.hasIME Capabilities.language Capabilities.os (true) (IME) (false) IME File 92 File File.createDirectory() AIR Test var dir:file = File.userDirectory.resolvePath("AIR Test"); dir.createdirectory(); createdirectory() FileStream FileStream() filemode FileMode.APPEND FileMode.WRITE FileStream 102

107 99 File createtempdirectory() var temp:file = File.createTempDirectory(); createtempdirectory() createtempfile() File getdirectorylisting() getdirectorylistingasync() File var directory:file = File.documentsDirectory; var contents:array = directory.getdirectorylisting(); for (var i:uint = 0; i < contents.length; i++) trace(contents[i].name, contents[i].size); directorylisting files File var directory:file = File.documentsDirectory; directory.getdirectorylistingasync(); directory.addeventlistener(filelistevent.directory_listing, dirlisthandler); function dirlisthandler(event:filelistevent):void var contents:array = event.files; for (var i:uint = 0; i < contents.length; i++) trace(contents[i].name, contents[i].size); var sourcedir:file = File.documentsDirectory.resolvePath("AIR Test"); var resultdir:file = File.documentsDirectory.resolvePath("AIR Test Copy"); sourcedir.copyto(resultdir); copyto() overwrite true copyto() newlocation 101

108 100 File deletedirectory() deletedirectoryasync() 90 AIR deletedirectorycontents true false AIR Test var directory:file = File.documentsDirectory.resolvePath("AIR Test"); directory.deletedirectory(true); AIR Test var directory:file = File.documentsDirectory.resolvePath("AIR Test"); directory.addeventlistener(event.complete, completehandler) directory.deletedirectoryasync(true); function completehandler(event:event):void trace("deleted.") movetotrash() movetotrashasync() 102 AIR API 21 AIR AIR 249 File File File creationdate creator exists extension icon isdirectory modificationdate name nativepath extension Macintosh Mac OS X Mac OS. extension null Icon File 91 File

109 101 File parent size type url File File null extension Macintosh Mac OS X Mac OS URL 91 File ActionScript 3.0 ( File File copyto() copytoasync() File moveto() movetoasync() copyto() moveto() copytoasync() movetoasync() 90 AIR File test.txt AIR Test copy.txt var original:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var newfile:file = File.resolvePath("AIR Test/copy.txt"); original.copyto(newfile, true); copyto() overwrite true true false IOErrorEvent addeventlistener() var original = File.documentsDirectory; original = original.resolvepath("air Test/test.txt"); var destination:file = File.documentsDirectory; destination = destination.resolvepath("air Test 2/copy.txt"); original.addeventlistener(event.complete, filemovecompletehandler); original.addeventlistener(ioerrorevent.io_error, filemoveioerroreventhandler); original.movetoasync(destination); function filemovecompletehandler(event:event):void trace(event.target); // [object File] function filemoveioerroreventhandler(event:ioerrorevent):void trace("i/o Error."); File File.moveToTrash() File.moveToTrashAsync()

110 102 File deletefile() deletefileasync() 90 AIR test.txt var file:file = File.documentsDirectory.resolvePath("test.txt"); file.deletefile(); test.txt var file:file = File.documentsDirectory.resolvePath("test.txt"); file.addeventlistener(event.complete, completehandler) file.deletefileasync(); function completehandler(event:event):void trace("deleted.") movetotrash() movetotrashasync 102 File movetotrash() movetotrashasync() 90 AIR test.txt var file:file = File.documentsDirectory.resolvePath("test.txt"); file.movetotrash(); File createtempfile() var temp:file = File.createTempFile(); createtempfile() createtempdirectory() AIR FileStream File

111 103 var file:file = File.documentsDirectory; file = file.resolvepath("air Test/testFile.txt"); File File.documentsDirectory resolvepath() File File 94 File FileStream FileStream open() openasync() File file filemode FileMode FileStream var filestream:filestream = new FileStream(); filestream.open(file, FileMode.WRITE); 104 FileStream 104 FileStream openasync() FileStream I/O FileStream 107 FileStream FileStream read write UTF readutfbytes() writeutfbytes() readbyte() readbytes() writebyte() writebytes() FileStream bytesavailable File spaceavailable 97 FileStream close() 104 FileStream FileStream Adobe AIR FileStream FileStream

112 104 FileStream FileStream open() openasync() filemode open() openasync() filemode FileMode.READ FileMode.WRITE FileMode.APPEND FileMode.UPDATE FileStream / FileStream FileStream File FileStream open() openasync() FileStream var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.open(myfile, FileMode.READ); filemode open() openasync() read write append update 104 FileStream openasync() var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.addeventlistener(event.complete, completehandler); myfilestream.addeventlistener(progressevent.progress, progresshandler); myfilestream.addeventlistener(ioerrorevent.ioerror, errorhandler); myfilestream.open(myfile, FileMode.READ); function completehandler(event:event):void //... function progresshandler(event:progressevent):void //... function errorhandler(event:ioerrorevent):void //... open() openasync() 90 AIR

113 105 FileStream filemode FileMode.READ FileMode.UPDATE FileStream 106 FileStream bytesavailable FileStream close() FileStream position FileStream position position 8 "hello" UTF var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.open(myfile, FileMode.UPDATE); myfilestream.position = 8; myfilestream.writeutfbytes("hello"); FileStream position 0 position 0 position position FileStream position position var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.open(myfile, FileMode.UPDATE); myfilestream.position = 4000; trace(myfilestream.position); // 4000 myfilestream.writebytes(mybytearray, 0, 200); trace(myfilestream.position); // 4200 append FileStream position append position

114 106 var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.openasync(myfile, FileMode.WRITE); myfilestream.writeutfbytes("hello"); myfilestream.writeutfbytes("world"); myfilestream.addeventlistener(event.close, closehandler); myfilestream.close(); trace("started."); closehandler(event:event):void trace("finished."); started. finished. position writebytes() position position (300) var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.openasync(myfile, FileMode.UPDATE); myfilestream.position = 4000; trace(myfilestream.position); // 4000 myfilestream.writebytes(mybytearray, 0, 200); myfilestream.position = 300; trace(myfilestream.position); // 300 FileStream bytesavailable FileStream open() openasync() filemode READ UPDATE FileStream FileStream open() openasync() open() position 100 var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.open(myfile, FileMode.READ); myfilestream.position = 10; myfilestream.readbytes(mybytearray, 0, 20); myfilestream.position = 89; myfilestream.readbytes(mybytearray, 0, 10); bytesavalable progress position bytesavailable position position bytesavailable bytesavailable position FileStream progress

115 107 FileStream progress ByteArray bytes var bytes:bytearray = new ByteArray(); var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.addeventlistener(progressevent.progress, progresshandler); myfilestream.openasync(myfile, FileMode.READ); function progresshandler(event:progressevent):void myfilestream.readbytes(bytes, myfilestream.position, myfilestream.bytesavailable); var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.addeventlistener(progressevent.progress, progresshandler); myfilestream.addeventlistener(event.complete, completed); myfilestream.openasync(myfile, FileMode.READ); myfilestream.position = 4000; var str:string = ""; function progresshandler(event:event):void if (myfilestream.bytesavailable > 8000 ) str += myfilestream.readmultibyte(8000, "iso "); FileStream FileStream FileStream position position position FileStream openasync() ActionScript FileStream progress, var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.addeventlistener(progressevent.progress, progresshandler); myfilestream.openasync(myfile, FileMode.READ); var str:string = ""; function progresshandler(event:progressevent):void str += myfilestream.readmultibyte(myfilestream.bytesavailable, "iso "); complete

116 108 var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.addeventlistener(event.complete, completed); myfilestream.openasync(myfile, FileMode.READ); var str:string = ""; function completehandler(event:event):void str = myfilestream.readmultibyte(myfilestream.bytesavailable, "iso "); FileStream OutputProgressEvent OutputProgressEvent bytespending outputprogress close() FileStream close ActionScript ByteArray bytes ByteArray var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.addeventlistener(event.complete, completehandler); myfilestream.openasync(myfile, FileMode.READ); var bytes:bytearray = new ByteArray(); function completehandler(event:event):void myfilestream.readbytes(bytes, 0, myfilestream.bytesavailable); bytes ByteArray var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.open(myfile, FileMode.WRITE); myfilestream.writebytes(bytes, 0, bytes.length); ActionScript ByteArray String FileStream ByteArray readmultibyte() var myfile:file = File.documentsDirectory.resolvePath("AIR Test/test.txt"); var myfilestream:filestream = new FileStream(); myfilestream.addeventlistener(event.complete, completed); myfilestream.openasync(myfile, FileMode.READ); var str:string = ""; function completehandler(event:event):void str = myfilestream.readmultibyte(myfilestream.bytesavailable, "iso "); readmultibyte() ActionScript iso ActionScript ActionScript 3.0

117 109 FileStream readutfbytes() UTF-8 UTF- 8 progress readutfbytes() readmultibyte() FileStream complete writemultibyte() writeutfbytes() String readutf() writeutf() readutfbytes() writeutfbytes() UTF UTF-BOM UTF-16 UTF XML XML readobject() writeobject() ActionScript AMF (ActionScript Message Format) ActionScript AIR Flash Player Flash Media Server Flex Data Services API readdouble() writedouble() MP3 MP3 MP3 ID3 ID3 ID ActionScript load() save() Flash Player 10 FileReference load() save() AIR 1.5 File FileReference Flash Player AIR var file:file = File.applicationStorageDirectory.resolvePath("test.txt"); var str:string = "Hello."; file.addeventlistener(event.complete, filesaved); file.save(str); function filesaved(event:event):void trace("done."); save() data String XML ByteArray String XML UTF- 8 UTF-8

118 110 var file:file = File.applicationStorageDirectory.resolvePath("test.txt"); file.addeventlistener(event.complete, loaded); file.load(); var str:string; function loaded(event:event):void var bytes:bytearray = file.data; str = bytes.readutfbytes(bytes.length); trace(str); FileStream load() save() FileStream FileStream FileStream FileStream open() openasync() filemode FileStream FileStream XML XML XML File FileStream FileStream readutfbytes() XML var file:file = File.documentsDirectory.resolvePath("AIR Test/preferences.xml"); var filestream:filestream = new FileStream(); filestream.open(file, FileMode.READ); var prefsxml:xml = XML(fileStream.readUTFBytes(fileStream.bytesAvailable)); filestream.close(); File FileStream FileStream XML var prefsxml:xml = <prefs><autosave>true</autosave></prefs>; var file:file = File.documentsDirectory.resolvePath("AIR Test/preferences.xml"); filestream = new FileStream(); filestream.open(file, FileMode.WRITE); var outputstring:string = '<?xml version="1.0" encoding="utf-8"?>\n'; outputstring += prefsxml.toxmlstring(); filestream.writeutfbytes(outputstring); filestream.close(); readutfbytes() writeutfbytes() UTF FileStream XML

119 111 var file:file = File.documentsDirectory.resolvePath("AIR Test/preferences.xml"); var filestream:filestream = new FileStream(); filestream.addeventlistener(event.complete, processxmldata); filestream.openasync(file, FileMode.READ); var prefsxml:xml; function processxmldata(event:event):void prefsxml = XML(fileStream.readUTFBytes(fileStream.bytesAvailable)); filestream.close(); FileStream complete processxmldata() readutfbytes() XML prefsxml MP3 ID3 ID3 ID3 ID3 1.0 MP3 ID3 1 MP3 128 ID3 / FileMode.UPDATE open() openasync() filemode var file:file = File.documentsDirectory.resolvePath("My Music/Sample ID3 v1.mp3"); var filestr:filestream = new FileStream(); filestr.open(file, FileMode.UPDATE); position 128 filestr.position = file.size - 128; position ID3 1.0 ID "TAG" 30 MP ISO complete id3tagread()

120 112 function id3tagread():void if (filestr.readmultibyte(3, "iso ").match(/tag/i)) var id3title:string = filestr.readmultibyte(30, "iso "); var id3artist:string = filestr.readmultibyte(30, "iso "); var id3album:string = filestr.readmultibyte(30, "iso "); var id3year:string = filestr.readmultibyte(4, "iso "); var id3comment:string = filestr.readmultibyte(30, "iso "); var id3genrecode:string = filestr.readbyte().tostring(10); id3title String newtitle filestr.position = file.length - 125; // filestr.writemultibyte(newtitle, "iso "); ID3 1 newtitle 30 0 (String.fromCharCode(0))

121 : API API HTML RTF URL API Adobe AIR NativeDragManager NativeDragOptions Clipboard NativeDragEvent Adobe Flash Adobe AIR AIR API

122 114 flash.desktop NativeDragManager NativeDragOptions Clipboard NativeDragActions ClipboardFormat ClipboardTransferModes API NativeDragActions ClipboardFormat ClipboardTransferModes flash.events NativeDragEvent nativedragstart nativedragcomplete Adobe AIR NativeDragManager.doDrag() mousedown mousemove AIR nativedragstart nativedragcomplete nativedragupdate AIR nativedragenter NativeDragManager.acceptDragDrop() nativedragover nativedragexit AIR nativedragdrop AIR nativedragcomplete AIR NativeDragManager NativeDragManager Clipboard Clipboard Clipboard Bitmap nativedragenter nativedragover nativedragdrop Clipboard Clipboard AIR ActionScript 3 Action Message Format (AMF3)

123 115 Flex Flex Adobe Flex API AIR Flex Flex AIR NativeDragManager Flex AIR AIR Clipboard mousedown NativeDragManager.doDrag() nativedragcomplete Clipboard ActionScript 3.0 ( Bitmap Clipboard import flash.desktop.clipboard; import flash.display.bitmap; import flash.filesystem.file; public function createclipboard(image:bitmap, sourcefile:file):clipboard var transfer:clipboard = new Clipboard(); transfer.setdata("custom_bitmap", image, true); //Flash object by value and by reference transfer.setdata(clipboardformats.bitmap_format, image.bitmapdata, false); transfer.setdata(clipboardformats.file_list_format, new Array(sourceFile), false); return transfer; NativeDragManager.doDrag() dodrag() initiator clipboard dragimage offset actionsallowed dragstart dragcomplete initiator Clipboard Clipboard NativeDragEvent BitmapData alpha Microsoft Windows alpha Point NativeDragOptions NativeDragEvent DragOptions

124 116 mousedown package import flash.desktop.nativedragmanager; import mx.core.uicomponent; import flash.display.sprite; import flash.display.loader; import flash.system.loadercontext; import flash.net.urlrequest; import flash.geom.point; import flash.desktop.clipboard; import flash.display.bitmap; import flash.filesystem.file; import flash.events.event; import flash.events.mouseevent; public class DragOutExample extends UIComponent Sprite protected var fileurl:string = "app:/image.jpg"; protected var display:bitmap; private function init():void loadimage(); private function onmousedown(event:mouseevent):void var bitmapfile:file = new File(fileURL); var transferobject:clipboard = createclipboard(display, bitmapfile); NativeDragManager.doDrag(this, transferobject, display.bitmapdata, new Point(-mouseX,-mouseY)); public function createclipboard(image:bitmap, sourcefile:file):clipboard var transfer:clipboard = new Clipboard(); transfer.setdata("bitmap", image, true); // ActionScript 3 Bitmap object by value and by reference transfer.setdata(clipboardformats.bitmap_format, image.bitmapdata, false); // Standard BitmapData format transfer.setdata(clipboardformats.file_list_format,

125 117 new Array(sourceFile), false); // Standard file list format return transfer; private function loadimage():void var url:urlrequest = new URLRequest(fileURL); var loader:loader = new Loader(); loader.load(url,new LoaderContext()); loader.contentloaderinfo.addeventlistener(event.complete, onloadcomplete); private function onloadcomplete(event:event):void display = event.target.loader.content; var flexwrapper:uicomponent = new UIComponent(); flexwrapper.addchild(event.target.loader.content); addchild(flexwrapper); flexwrapper.addeventlistener(mouseevent.mouse_down, onmousedown); nativedragcomplete dropaction NativeDragAction.MOVE dropaction NativeDragAction.NONE nativedragenter nativedragover 1 Clipboard 2 nativedragenter 3 nativedragenter NativeDragManager.acceptDragDrop() 4 NativeDragManager 5 6 nativedragdrop 7 Clipboard 8 AIR nativedragcomplete AIR

126 118 nativedragenter nativedragover clipboard allowedactions NativeDragManager.acceptDragDrop() acceptdragdrop() nativedragexit acceptdragdrop() dodrag() allowedactions NativeDragEvent dropaction NativeDragManager dropaction NativeDragManager nativedragenter nativedragover dropaction nativedragenter nativedragover import flash.desktop.nativedragmanager; import flash.events.nativedragevent; public function ondragin(event:nativedragevent):void NativeDragManager.dropAction = NativeDragActions.MOVE; if(event.clipboard.hasformat(clipboardformats.text_format)) NativeDragManager.acceptDragDrop(this); //'this' is the receiving component nativedragdrop clipboard Clipboard getdata() transfermode nativedragdrop import flash.desktop.clipboard; import flash.events.nativedragevent; public function ondrop(event:nativedragevent):void if (event.clipboard.hasformat(clipboardformats.text_format)) var text:string = String(event.clipboard.getData(ClipboardFormats.TEXT_FORMAT, ClipboardTransferMode.ORIGINAL_PREFERRED)); Clipboard NativeDragEvent

127 119 nativedragstart nativedragupdate nativedragenter nativedragover nativedragexit nativedragcomplete nativedragstart nativedragupdate nativedragover nativedragover nativedragover HTML HTML HTMLLoader HTML HTML HTML API HTML DOM HTML HTMLLoader AIR NativeDragEvent NativeDragManager API HTML API HTML DOM HTML URL preventdefault() WebKit CSS -webkit-user-select HTML -webkit-user-select none -webkit-user-drag CSS 192 CSS HTML

128 120 dragstart drag dragend preventdefault() effectallowed datatransfer dragover dragenter datatransfer.dropeffect dragenter datatransfer dragover dragenter dragover dragleave drop (clientx, clienty) (screenx, screeny) datatransfer datatransfer effectallowed dropeffect dragstart 121 HTML dragover dragenter dropeffect AIR dropeffect dropeffect dragover dragenter dragend dropeffect dropeffect none types getdata(mimetype) datatransfer MIME mimetype drop getdata() setdata(mimetype) mimetype datatransfer MIME setdata() datatransfer dragstart setdata() cleardata(mimetype) setdragimage(image, offsetx, offsety) mimetype dragstart setdragimage() HTML MIME HTML datatransfer MIME

129 121 HTML URL MIME "text/plain" "text/html" "text/uri-list" "image/x-vnd.adobe.air.bitmap" "application/x-vnd.adobe.air.file-list" MIME datatransfer File 124 HTML HTML dragstart datatransfer.effectallowed "none" "copy" "link" "move" "copylink" "copymove" "linkmove" "all" All datatransfer.dropeffect dragover dragenter dropeffect function dodragstart(event) event.datatransfer.setdata("text/plain","text to drag"); event.datatransfer.effectallowed = "copymove"; function dodragover(event) event.datatransfer.dropeffect = "copy"; function dodragenter(event) event.datatransfer.dropeffect = "copy"; dragenter dropeffect dragover dropeffect

130 122 HTML HTML CSS -webkit-user-select -webkit-user-drag dragstart datatransfer setdata() dragstart datatransfer.effectallowed "copylink" datatransfer dragstart datatransfer.setdata() MIME ID imageofgeorge dragstart George function dragstarthandler(event) event.datatransfer.effectallowed = "copy"; var dragimage = document.getelementbyid("imageofgeorge"); var dragfile = new air.file(dragimage.src); event.datatransfer.setdata("text/plain","a picture of George"); event.datatransfer.setdata("image/x-vnd.adobe.air.bitmap", dragimage); event.datatransfer.setdata("application/x-vnd.adobe.air.file-list", new Array(dragFile)); datatransfer setdata() HTML contenteditable designmode "on" dragenter dragover drop HTML dragenter dragover preventdefault() ondrop function dodrop(event) droppedtext = event.datatransfer.getdata("text/plain"); datatransfer.getdata() MIME datatransfer types types MIME dragenter dragover API

131 123 HTML div dragenter dragover preventdefault() drop HTML <html> <head> <title>drag-and-drop</title> <script language="javascript" type="text/javascript" src="airaliases.js"></script> <script language="javascript"> function init() var target = document.getelementbyid('target'); target.addeventlistener("dragenter", dragenteroverhandler); target.addeventlistener("dragover", dragenteroverhandler); target.addeventlistener("drop", drophandler); var source = document.getelementbyid('source'); source.addeventlistener("dragstart", dragstarthandler); source.addeventlistener("dragend", dragendhandler); emptyrow = document.getelementbyid("emptytargetrow"); function dragstarthandler(event) event.datatransfer.effectallowed = "copy"; function dragendhandler(event) air.trace(event.type + ": " + event.datatransfer.dropeffect); function dragenteroverhandler(event) event.preventdefault(); var emptyrow; function drophandler(event) for(var prop in event) air.trace(prop + " = " + event[prop]); var row = document.createelement('tr'); row.innerhtml = "<td>" + event.datatransfer.getdata("text/plain") + "</td>" + "<td>" + event.datatransfer.getdata("text/html") + "</td>" + "<td>" + event.datatransfer.getdata("text/uri-list") + "</td>" + "<td>" + event.datatransfer.getdata("application/x-vnd.adobe.air.file-list") + "</td>"; var imagecell = document.createelement('td'); if((event.datatransfer.types.tostring()).search("image/x-vnd.adobe.air.bitmap") > -1) imagecell.appendchild(event.datatransfer.getdata("image/x-vnd.adobe.air.bitmap")); row.appendchild(imagecell); var parent = emptyrow.parentnode; parent.insertbefore(row, emptyrow); </script> </head> <body onload="init()" style="padding:5px"> <div>

132 124 <h1>source</h1> <p>items to drag:</p> <ul id="source"> <li>plain text.</li> <li>html <b>formatted</b> text.</li> <li>a <a href=" <li><img src="icons/airapp_16.png" alt="an image"/></li> <li style="-webkit-user-drag:none;"> Uses "-webkit-user-drag:none" style. </li> <li style="-webkit-user-select:none;"> Uses "-webkit-user-select:none" style. </li> </ul> </div> <div id="target" style="border-style:dashed;"> <h1 >Target</h1> <p>drag items from the source list (or elsewhere).</p> <table id="displaytable" border="1"> <tr><th>plain text</th><th>html text</th><th>url</th><th>file list</th><th>bitmap Data</th></tr> <tr id="emptytargetrow"><td> </td><td> </td><td> </td><td> </td><td> </td></tr> </table> </div> </div> </body> </html> HTML AIR File File HTMLLoader AIR nativedragdrop HTMLLoader AIR HTML HTML window.htmlloader HTMLLoader window.htmlloader.addeventlistener("nativedragdrop",function(event) var filelist = event.clipboard.getdata(air.clipboardformats.file_list_format); air.trace(filelist[0].url); ); ( HTMLLoader nativedragdrop URL

133 125 <html> <head> <title>drag-and-drop in a remote sandbox</title> <script language="javascript" type="text/javascript" src="airaliases.js"></script> <script language="javascript"> window.htmlloader.addeventlistener("nativedragdrop",function(event) var filelist = event.clipboard.getdata(air.clipboardformats.file_list_format); air.trace(filelist[0].url); ); </script> </head> <body> <iframe src="child.html" sandboxroot=" documentroot="app:/" frameborder="0" width="100%" height="100%"> </iframe> </body> </html> HTML dragenter dragover Event preventdefault() <html> <head> <title>drag and drop target</title> <script language="javascript" type="text/javascript"> function preventdefault(event) event.preventdefault(); </script> </head> <body ondragenter="preventdefault(event)" ondragover="preventdefault(event)"> <div> <h1>drop Files Here</h1> </div> </body> </html> 194 HTML JavaScript

134 : API Adobe AIR HTML RTF URL Adobe Flash Player 10 AIR 1.0 Adobe AIR Adobe ActionScript 3.0 Adobe AIR ClipboardFormats ClipboardTransferMode Adobe ActionScript 3.0 Flash Adobe AIR AIR HTML HTML AIR Clipboard.generalClipboard JavaScript HTML copy cut paste clipboarddata

135 127 AIR AIR preventdefault() clipboarddata clipboarddata clipboarddata setdata() MIME function customcopy(event) event.clipboarddata.setdata("text/plain", "A copied string."); clipboarddata getdata() MIME types function custompaste(event) var pasteddata = event.clipboarddata("text/plain"); paste getdata() types HTML copy HTML cut paste HTML

136 128 <html> <head> <title>copy and Paste</title> <script language="javascript" type="text/javascript"> function oncopy(event) var selection = window.getselection(); event.clipboarddata.setdata("text/html","<i>" + selection + "</i>"); event.preventdefault(); function oncut(event) var selection = window.getselection(); event.clipboarddata.setdata("text/html","<i>" + selection + "</i>"); var range = selection.getrangeat(0); range.extractcontents(); event.preventdefault(); function onpaste(event) var insertion = document.createelement("b"); insertion.innerhtml = event.clipboarddata.getdata("text/html"); var selection = window.getselection(); var range = selection.getrangeat(0); range.insertnode(insertion); event.preventdefault(); </script> </head> <body oncopy="oncopy(event)" onpaste="onpaste(event)" oncut="oncut(event)"> <p>sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</p> </body> </html> OS X Windows Flex ActionScript HTML DHTML select focus copy Scrap docopy()

137 129 function copycommand(event:event):void if(nativeapplication.nativeapplication.activewindow.stage.focus is Scrap) Scrap(NativeApplication.nativeApplication.activeWindow.stage.focus).doCopy(); else NativeApplication.nativeApplication.copy(); copycommand() NativeApplication copy() NativeApplication copy() Textfield HTMLLoader copy TextArea HTML NativeApplication HTML Mac OS X ContextMenuEvent contextmenuowner Mac OS X Mac OS X NativeMenuItem label private function finditembyname(menu:nativemenu, name:string, recurse:boolean = false):nativemenuitem var searchitem:nativemenuitem = null; for each (var item:nativemenuitem in menu.items) if(item.label == name) searchitem = item; break; if((item.submenu!= null) && recurse) searchitem = finditembyname(item.submenu, name); return searchitem; recurse true false

138 130 private function init():void stage.addeventlistener(keyboardevent.key_down, keylistener); private function keylistener(event:keyboardevent):void if(event.ctrlkey) event.preventdefault(); switch(string.fromcharcode(event.charcode)) case "c": NativeApplication.nativeApplication.copy(); break; case "x": NativeApplication.nativeApplication.cut(); break; case "v": NativeApplication.nativeApplication.paste(); break; case "a": NativeApplication.nativeApplication.selectAll(); break; case "z": NativeApplication.nativeApplication.undo(); break; case "y": NativeApplication.nativeApplication.redo(); break; HTML copy paste

139 : ByteArray 8 ByteArray writeobject() Action Message Format (AMF) ByteArray readobject() ByteArray AMF Adobe AIR.zip.zip ByteArray ByteArray flash.utils ActionScript 3.0 ByteArray ByteArray import flash.utils.bytearray; var stream:bytearray = new ByteArray(); ByteArray ID MP3 ID3 ByteArray readbytes() writebytes() readint() writeint() readfloat() writefloat() readobject() writeobject() readutfbytes() writeutfbytes() ByteArray ByteArray writeutfbytes() writefloat() // The following example reads a simple Array (groceries), made up of strings // and floating-point numbers, and writes it to a ByteArray. import flash.utils.bytearray; // define the grocery list Array var groceries:array = ["milk", 4.50, "soup", 1.79, "eggs", 3.19, "bread", 2.35] // define the ByteArray var bytes:bytearray = new ByteArray(); // for each item in the array for (var i:int = 0; i < groceries.length; i++) bytes.writeutfbytes(groceries[i++]); //write the string and position to the next item bytes.writefloat(groceries[i]);// write the float trace("bytes.position is: " + bytes.position);//display the position in ByteArray trace("bytes length is: " + bytes.length);// display the length

140 132 position position ByteArray position 0 var bytes:bytearray = new ByteArray(); trace("bytes.position is initially: " + bytes.position); // 0 ByteArray position ByteArray position ByteArray var bytes:bytearray = new ByteArray(); trace("bytes.position is initially: " + bytes.position); // 0 bytes.writeutfbytes("hello World!"); trace("bytes.position is now: " + bytes.position);// 12 position var bytes:bytearray = new ByteArray(); trace("bytes.position is initially: " + bytes.position); // 0 bytes.writeutfbytes("hello World!"); trace("bytes.position is now: " + bytes.position);// 12 bytes.position = 0; trace("the first 6 bytes are: " + (bytes.readutfbytes(6)));//hello trace("and the next 6 bytes are: " + (bytes.readutfbytes(6)));// World! position ByteArray bytesavailable length length bytesavailable ByteArray ByteArray ByteArray a (bytesavailable <= 0) var bytes:bytearray = new ByteArray(); var text:string = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus etc."; bytes.writeutfbytes(text); // write the text to the ByteArray trace("the length of the ByteArray is: " + bytes.length);// 70 bytes.position = 0; // reset position while (bytes.bytesavailable > 0 && (bytes.readutfbytes(1)!= 'a')) //read to letter a or end of bytes if (bytes.position < bytes.bytesavailable) trace("found the letter a; position is: " + bytes.position); // 23 trace("and the number of bytes available is: " + bytes.bytesavailable);// 47 endian big endian little endian 0x big endian little endian a0 4 a3

141 133 Big Endian Big Endian Big Endian Big Endian a0 a1 a2 a Little Endian Little Endian Little Endian Little Endian a0 a1 a2 a ByteArray endian "bigendian" "littleendian" Endian BIG_ENDIAN LITTLE_ENDIAN endian compress() uncompress() compress() ByteArray uncompress() ByteArray compress() uncompress() position CompressionAlgorithm AIR deflate zlib deflate zlib gzip zip zlib deflate deflate bytes ByteArray bytes.compress(compressionalgorithm.deflate); deflate ByteArray bytes.uncompress(compressionalgorithm.deflate); readobject() writeobject() ByteArray Action Message Format (AMF) AMF Adobe ActionScript 3.0 Netstream NetConnection NetStream LocalConnection SharedObject AMF 13 value-type = undefined-marker null-marker false-marker true-marker integer-type double-type string-type xml-doc-type date-type array-type object-type xml-type byte-array-type null true false AMF AMF0 AMF3 AMF 0 AMF 3 AMF 0 traits ActionScript 3.0 ByteArray.objectEcoding AMF flash.net.objectencoding AMF ObjectEncoding.AMF0 ObjectEncoding.AMF3 import flash.filesystem.*; import flash.utils.bytearray; // Label component must be in Library import fl.controls.label;

142 134 var bytes:bytearray = new ByteArray(); var mylabel:label = new Label(); mylabel.move(150, 150); mylabel.width = 200; addchild(mylabel); var myxml:xml = <order> <item id='1'> <menuname>burger</menuname> <price>3.95</price> </item> <item id='2'> <menuname>fries</menuname> <price>1.45</price> </item> </order> // Write XML object to ByteArray bytes.writeobject(myxml); bytes.position = 0;//reset position to beginning bytes.compress(compressionalgorithm.deflate);// compress ByteArray outfile("order", bytes); mylabel.text = "Wrote order file to desktop!"; function outfile(filename:string, data:bytearray):void var outfile:file = File.desktopDirectory; // dest folder is desktop outfile = outfile.resolvepath(filename); // name of file to write var outstream:filestream = new FileStream(); // open output file stream in WRITE mode outstream.open(outfile, FileMode.WRITE); // write out the file outstream.writebytes(data, 0, data.length); // close it outstream.close(); readobject() ByteArray AMF order ByteArray (inbytes) readobject() XML orderxml for each() objectencoding order import flash.filesystem.*; import flash.utils.bytearray; // TextArea component must be in Library import fl.controls.textarea;

143 135 var inbytes:bytearray = new ByteArray(); // define text area for displaying XML content var mytxt:textarea = new TextArea(); mytxt.width = 550; mytxt.height = 400; addchild(mytxt); //display objectencoding and file heading mytxt.text = "Object encoding is: " + inbytes.objectencoding + "\n\n" + "order file: \n\n"; readfile("order", inbytes); inbytes.position = 0; // reset position to beginning inbytes.uncompress(compressionalgorithm.deflate); inbytes.position = 0;//reset position to beginning // read XML Object var orderxml:xml = inbytes.readobject(); //for each node in orderxml for each(var child:xml in orderxml) // append child node to text area mytxt.text += child + "\n"; // read specified file into byte array function readfile(filename:string, data:bytearray) var infile:file = File.desktopDirectory; // source folder is desktop infile = infile.resolvepath(filename); // name of file to read var instream:filestream = new FileStream(); instream.open(infile, FileMode.READ); instream.readbytes(data, 0, data.length); instream.close(); ByteArray.zip.zip ByteArray.zip PKWARE Inc. zip Zip64 Zip64 zip (8=DEFLATE; 0=UNCOMPRESSED) 2

144 136 crc DEFLATE 8 (tafiles) zip import flash.filesystem.*; import flash.utils.bytearray; import flash.events.event; import fl.controls.*; //requires TextArea and Label components in the Library var tafiles = new TextArea(); var output = new Label(); tafiles.setsize(320, 150); tafiles.move(10, 30); output.move(10, 10); output.width = 150; output.text = "Contents of HelloAir.zip"; addchild(tafiles); addchild(output); bytes ByteArray var bytes:bytearray = new ByteArray(); // variables for reading fixed portion of file header var filename:string = new String(); var flnamelength:uint; var xfldlength:uint; var offset:uint; var compsize:uint; var uncompsize:uint; var compmethod:int; var signature:int;.zip File (zfile) FileStream (zstream).zip HelloAIR.zip

145 137 // File variables for accessing.zip file var zfile:file = File.desktopDirectory.resolvePath("HelloAIR.zip"); var zstream:filestream = new FileStream(); READ.zip zstream.open(zfile, FileMode.READ); bytes endian LITTLE_ENDIAN bytes.endian = Endian.LITTLE_ENDIAN; while() while (zstream.position < zfile.size) 30 ByteArray bytes 30 // read fixed metadata portion of local file header zstream.readbytes(bytes, 0, 30); 30 (signature) ZIP 0x04034b50 zip while bytes.position = 0; signature = bytes.readint(); // if no longer reading data files, quit if (signature!= 0x04034b50) break; 8 compmethod.zip DEFLATE DEFLATE compmethod 8 compmethod 0 bytes.position = 8; compmethod = bytes.readbyte(); // store compression method (8 == Deflate) 30 offset offset = 0;// stores length of variable portion of metadata bytes.position = 26; // offset to file name length flnamelength = bytes.readshort();// store file name offset += flnamelength; // add length of file name bytes.position = 28;// offset to extra field length xfldlength = bytes.readshort(); offset += xfldlength;// add length of extra field offset // read variable length bytes between fixed-length header and compressed file data zstream.readbytes(bytes, 30, offset);

146 138 bytes.position = 30; filename = bytes.readutfbytes(flnamelength); // read file name tafiles.appendtext(filename + "\n"); // write file name to text area bytes.position = 18; compsize = bytes.readunsignedint(); // store size of compressed portion tafiles.appendtext("\tcompressed size is: " + compsize + '\n'); bytes.position = 22; // offset to uncompressed size uncompsize = bytes.readunsignedint(); // store uncompressed size tafiles.appendtext("\tuncompressed size is: " + uncompsize + '\n'); bytes 30 // read compressed file to offset 0 of bytes; for uncompressed files // the compressed and uncompressed size is the same zstream.readbytes(bytes, 0, compsize); outfile() outfile() if (compmethod == 8) // if file is compressed, uncompress bytes.uncompress(compressionalgorithm.deflate); outfile(filename, bytes); // call outfile() to write out the file while outfile() while.zip.zip // end of while loop outfile() WRITE filename data (outstream) function outfile(filename:string, data:bytearray):void var outfile:file = File.desktopDirectory; // destination folder is desktop outfile = outfile.resolvepath(filename); // name of file to write var outstream:filestream = new FileStream(); // open output file stream in WRITE mode outstream.open(outfile, FileMode.WRITE); // write out the file outstream.writebytes(data, 0, data.length); // close it outstream.close();

147 : SQL Adobe AIR SQL SQL SQLite SQL SQL SQL SQL Adobe AIR SQL SQL SQLCollationType SQLColumnNameStyle SQLColumnSchema SQLConnection SQLError SQLErrorEvent SQLErrorOperation SQLEvent SQLIndexSchema SQLMode SQLResult SQLSchema SQLSchemaResult SQLStatement SQLTableSchema SQLTransactionLockType SQLTriggerSchema SQLUpdateEvent SQLViewSchema Adobe Flash Adobe AIR AIR SQL

148 SQL 140 SQL Adobe AIR SQL AIR AIR SQL SQL SQL AIR SQL Adobe AIR SQL AIR AIR AIR Adobe AIR SQL SQL AIR SQL SQL id id id id

149 SQL 141 AIR SQL (SQL) SQL SQL SQL (ANSI) Adobe AIR SQL SQL-92 Adobe AIR SQL ActionScript 3.0 SQL SQL ActionScript 3.0 SQL flash.data flash.data.sqlconnection flash.data.sqlstatement flash.data.sqlresult SQL SELECT UPDATE DELETE flash.data flash.data.sqlschemaresult flash.data.sqltableschema flash.data.sqlviewschema flash.data.sqlindexschema flash.data.sqltriggerschem a SQLConnection.loadSchema() flash.data SQLConnection SQLColumnSchema flash.data.sqlmode flash.data.sqlcolumnnamestyle flash.data.sqltransactionlocktyp e flash.data.sqlcollationtype SQLConnection.open() SQLConnection.openAsync() openmode SQLConnection.columnNameStyle SQLConnection.begin() option SQLColumnSchema() SQLColumnSchema.defaultCollationType defaultcollationtype flash.events

150 SQL 142 flash.data.sqlevent flash.data.sqlerrorevent flash.data.sqlupdateevent SQLConnection SQLStatement SQLEvent SQLConnection SQLStatement INSERT UPDATE DELETE SQL SQLConnection flash.errors flash.data.sqlerror flash.data.sqlerrorevent SQLError operation SQL Adobe AIR SQLConnection SQLConnection SQLConnection SQLConnection.open() SQLConnection.openAsync() open() openasync() SQLConnection 158

151 SQL 143 SQLConnection open() openasync() open() openasync() File reference open() openasync() open() openasync() reference null open() openasync() DBSample.db import flash.data.sqlconnection; import flash.events.sqlerrorevent; import flash.events.sqlevent; import flash.filesystem.file; var conn:sqlconnection = new SQLConnection(); conn.addeventlistener(sqlevent.open, openhandler); conn.addeventlistener(sqlerrorevent.error, errorhandler); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); conn.openasync(dbfile); function openhandler(event:sqlevent):void trace("the database was created successfully"); function errorhandler(event:sqlerrorevent):void trace("error message:", event.error.message); trace("details:", event.error.details); SQLConnection open() SQLConnection import flash.data.sqlconnection; import flash.errors.sqlerror; import flash.filesystem.file; var conn:sqlconnection = new SQLConnection(); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); try conn.open(dbfile); trace("the database was created successfully"); catch (error:sqlerror) trace("error message:", error.message); trace("details:", error.details); SQL SELECT INSERT SQL CREATE TABLE SQL 146 SQL employees conn SQLConnection

152 SQL 144 import flash.data.sqlconnection; import flash.data.sqlstatement; import flash.events.sqlerrorevent; import flash.events.sqlevent; //... create and open the SQLConnection instance named conn... var createstmt:sqlstatement = new SQLStatement(); createstmt.sqlconnection = conn; var sql:string = "CREATE TABLE IF NOT EXISTS employees (" + " empid INTEGER PRIMARY KEY AUTOINCREMENT, " + " firstname TEXT, " + " lastname TEXT, " + " salary NUMERIC CHECK (salary > 0)" + ")"; createstmt.text = sql; createstmt.addeventlistener(sqlevent.result, createresult); createstmt.addeventlistener(sqlerrorevent.error, createerror); createstmt.execute(); function createresult(event:sqlevent):void trace("table created"); function createerror(event:sqlerrorevent):void trace("error message:", event.error.message); trace("details:", event.error.details); employees conn SQLConnection import flash.data.sqlconnection; import flash.data.sqlstatement; import flash.errors.sqlerror; //... create and open the SQLConnection instance named conn... var createstmt:sqlstatement = new SQLStatement(); createstmt.sqlconnection = conn; var sql:string = "CREATE TABLE IF NOT EXISTS employees (" + " empid INTEGER PRIMARY KEY AUTOINCREMENT, " + " firstname TEXT, " + " lastname TEXT, " + " salary NUMERIC CHECK (salary > 0)" + ")"; createstmt.text = sql; try createstmt.execute(); trace("table created"); catch (error:sqlerror) trace("error message:", error.message); trace("details:", error.details);

153 SQL 145 SQL SQL SQLConnection SQLConnection open() openasync() openasync() SQLConnection open openasync() SQLConnection error DBSample.db import flash.data.sqlconnection; import flash.data.sqlmode; import flash.events.sqlerrorevent; import flash.events.sqlevent; import flash.filesystem.file; var conn:sqlconnection = new SQLConnection(); conn.addeventlistener(sqlevent.open, openhandler); conn.addeventlistener(sqlerrorevent.error, errorhandler); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); conn.openasync(dbfile, SQLMode.UPDATE); function openhandler(event:sqlevent):void trace("the database opened successfully"); function errorhandler(event:sqlerrorevent):void trace("error message:", event.error.message); trace("details:", event.error.details); DBSample.db

154 SQL 146 import flash.data.sqlconnection; import flash.data.sqlmode; import flash.errors.sqlerror; import flash.filesystem.file; var conn:sqlconnection = new SQLConnection(); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); try conn.open(dbfile, SQLMode.UPDATE); trace("the database opened successfully"); catch (error:sqlerror) trace("error message:", error.message); trace("details:", error.details); openasync() open() SQLMode.UPDATE (openmode) SQLMode.UPDATE openmode SQLMode.CREATE openmode SQLMode.Update openmode SQLMode.READ SQL SQL SQLStatement SQL SQLStatement SQLStatement SQL var selectdata:sqlstatement = new SQLStatement(); SQLStatement sqlconnection SQLConnection // A SQLConnection named "conn" has been created previously selectdata.sqlconnection = conn; SQL SQLStatement text selectdata.text = "SELECT col1, col2 FROM my_table WHERE col1 = :param1"; addeventlistener() SQLStatement result error // using listener methods and addeventlistener(); selectdata.addeventlistener(sqlevent.result, resulthandler); selectdata.addeventlistener(sqlerrorevent.error, errorhandler); function resulthandler(event:sqlevent):void // do something after the statement execution succeeds function errorhandler(event:sqlerrorevent):void // do something after the statement execution fails

155 SQL 147 Responder Responder // using a Responder (flash.net.responder) var selectresponder = new Responder(onResult, onerror); function onresult(result:sqlresult):void // do something after the statement execution succeeds function onerror(error:sqlerror):void // do something after the statement execution fails SQLStatement parameters selectdata.parameters[":param1"] = 25; SQL SQLStatement execute() // using synchronous execution mode // or listener methods in asynchronous execution mode selectdata.execute(); Responder Responder execute() // using a Responder in asynchronous execution mode selectdata.execute(-1, selectresponder); SQL SQL INSERT SQL SQL INSERT SQL SQL SQL SQL SQLStatement text SQL SQLStatement parameters parameters statement.parameters[parameter_identifier] = value; parameter_identifier

156 SQL 148 var sql:string = "INSERT INTO inventoryitems (name, productcode)" + "VALUES (:name, :productcode)"; var additemstmt:sqlstatement = new SQLStatement(); additemstmt.sqlconnection = conn; additemstmt.text = sql; // set parameter values additemstmt.parameters[":name"] = "Item name"; additemstmt.parameters[":productcode"] = "12345"; additemstmt.execute();? SQL 0 var sql:string = "INSERT INTO inventoryitems (name, productcode)" + "VALUES (?,?)"; var additemstmt:sqlstatement = new SQLStatement(); additemstmt.sqlconnection = conn; additemstmt.text = sql; // set parameter values additemstmt.parameters[0] = "Item name"; additemstmt.parameters[1] = "12345"; additemstmt.execute(); SQL SQL SQLStatement SQLStatement SQL SQL ActionScript 3.0 SQL SQL SQL SQL SQL SQL SQL SQL // assume the variables "username" and "password" // contain user-entered data var sql:string = "SELECT userid " + "FROM users " + "WHERE username = '" + username + "' " + " AND password = '" + password + "'"; var statement:sqlstatement = new SQLStatement(); statement.text = sql;

157 SQL 149 SQL SQL // assume the variables "username" and "password" // contain user-entered data var sql:string = "SELECT userid " + "FROM users " + "WHERE username = :username " + " AND password = :password"; var statement:sqlstatement = new SQLStatement(); statement.text = sql; // set parameter values statement.parameters[":username"] = username; statement.parameters[":password"] = password; SQL SELECT SELECT SQLStatement SQL SELECT text execute() SELECT ActionScript 3.0 SQL SELECT products var selectstmt:sqlstatement = new SQLStatement(); // A SQLConnection named "conn" has been created previously selectstmt.sqlconnection = conn; selectstmt.text = "SELECT itemid, itemname, price FROM products"; // The resulthandler and errorhandler are listener methods are // described in a subsequent code listing selectstmt.addeventlistener(sqlevent.result, resulthandler); selectstmt.addeventlistener(sqlerrorevent.error, errorhandler); selectstmt.execute(); SELECT products var selectstmt:sqlstatement = new SQLStatement(); // A SQLConnection named "conn" has been created previously selectstmt.sqlconnection = conn; selectstmt.text = "SELECT itemid, itemname, price FROM products"; // This try..catch block is fleshed out in // a subsequent code listing try selectstmt.execute(); // accessing the data is shown in a subsequent code listing catch (error:sqlerror) // error handling is shown in a subsequent code listing SQLStatement result (SQLEvent.RESULT) execute() Responder Responder execute()

158 SQL 150 SELECT SELECT SELECT Object SELECT itemid itemname price itemid itemname price Object result function resulthandler(event:sqlevent):void var result:sqlresult = selectstmt.getresult(); var numresults:int = result.data.length; for (var i:int = 0; i < numresults; i++) var row:object = result.data[i]; var output:string = "itemid: " + row.itemid; output += "; itemname: " + row.itemname; output += "; price: " + row.price; trace(output); function errorhandler(event:sqlerrorevent):void // Information about the error is available in the // event.error property, which is an instance of // the SQLError class. try..catch try selectstmt.execute(); var result:sqlresult = selectstmt.getresult(); var numresults:int = result.data.length; for (var i:int = 0; i < numresults; i++) var row:object = result.data[i]; var output:string = "itemid: " + row.itemid; output += "; itemname: " + row.itemname; output += "; price: " + row.price; trace(output); catch (error:sqlerror) // Information about the error is available in the // error variable, which is an instance of // the SQLError class. SQLResult data SQLResult SQLStatement getresult() execute() Responder SQLResult execute() SQLStatement getresult() SQLResult data

159 SQL 151 SELECT SQLStatement employees firstname lastname selectresult() SQLStatement.getResult() trace() conn SQLConnection employees import flash.data.sqlconnection; import flash.data.sqlresult; import flash.data.sqlstatement; import flash.events.sqlerrorevent; import flash.events.sqlevent; //... create and open the SQLConnection instance named conn... // create the SQL statement var selectstmt:sqlstatement = new SQLStatement(); selectstmt.sqlconnection = conn; // define the SQL text var sql:string = "SELECT firstname, lastname " + "FROM employees"; selectstmt.text = sql; // register listeners for the result and error events selectstmt.addeventlistener(sqlevent.result, selectresult); selectstmt.addeventlistener(sqlerrorevent.error, selecterror); // execute the statement selectstmt.execute(); function selectresult(event:sqlevent):void // access the result data var result:sqlresult = selectstmt.getresult(); var numrows:int = result.data.length; for (var i:int = 0; i < numrows; i++) var output:string = ""; for (var columnname:string in result.data[i]) output += columnname + ": " + result.data[i][columnname] + "; "; trace("row[" + i.tostring() + "]\t", output); function selecterror(event:sqlerrorevent):void trace("error message:", event.error.message); trace("details:", event.error.details); SELECT SQLStatement employees firstname lastname SQLStatement.getResult() trace() conn SQLConnection employees

160 SQL 152 import flash.data.sqlconnection; import flash.data.sqlresult; import flash.data.sqlstatement; import flash.errors.sqlerror; //... create and open the SQLConnection instance named conn... // create the SQL statement var selectstmt:sqlstatement = new SQLStatement(); selectstmt.sqlconnection = conn; // define the SQL text var sql:string = "SELECT firstname, lastname " + "FROM employees"; selectstmt.text = sql; try // execute the statement selectstmt.execute(); // access the result data var result:sqlresult = selectstmt.getresult(); var numrows:int = result.data.length; for (var i:int = 0; i < numrows; i++) var output:string = ""; for (var columnname:string in result.data[i]) output += columnname + ": " + result.data[i][columnname] + "; "; trace("row[" + i.tostring() + "]\t", output); catch (error:sqlerror) trace("error message:", error.message); trace("details:", error.details); SELECT SELECT Object SQL SELECT SQLStatement itemclass itemclass SELECT SELECT itemclass itemclass SELECT SELECT itemclass SELECT SELECT SELECT SQLStatement.execute() prefetch prefetch SQLStatement execute() prefetch

161 SQL 153 var stmt:sqlstatement = new SQLStatement(); stmt.sqlconnection = conn; stmt.text = "SELECT..."; stmt.addeventlistener(sqlevent.result, selectresult); stmt.execute(20); // only the first 20 rows (or fewer) are returned result SQLResult data complete SQLStatement next() execute() next() result function selectresult(event:sqlevent):void var result:sqlresult = stmt.getresult(); if (result.data!= null) //... loop through the rows or perform other processing... if (!result.complete) stmt.next(20); // retrieve the next 20 rows else stmt.removeeventlistener(sqlevent.result, selectresult); next() SQLStatement result next() SQLStatement.execute() prefetch SQLStatement.next() SQL INSERT INSERT SQL INSERT SQLStatement SQLStatement employees conn SQLConnection employees

162 SQL 154 import flash.data.sqlconnection; import flash.data.sqlresult; import flash.data.sqlstatement; import flash.events.sqlerrorevent; import flash.events.sqlevent; //... create and open the SQLConnection instance named conn... // create the SQL statement var insertstmt:sqlstatement = new SQLStatement(); insertstmt.sqlconnection = conn; // define the SQL text var sql:string = "INSERT INTO employees (firstname, lastname, salary) " + "VALUES ('Bob', 'Smith', 8000)"; insertstmt.text = sql; // register listeners for the result and failure (status) events insertstmt.addeventlistener(sqlevent.result, insertresult); insertstmt.addeventlistener(sqlerrorevent.error, inserterror); // execute the statement insertstmt.execute(); function insertresult(event:sqlevent):void trace("insert statement succeeded"); function inserterror(event:sqlerrorevent):void trace("error message:", event.error.message); trace("details:", event.error.details); employees conn SQLConnection employees import flash.data.sqlconnection; import flash.data.sqlresult; import flash.data.sqlstatement; import flash.errors.sqlerror; //... create and open the SQLConnection instance named conn... // create the SQL statement var insertstmt:sqlstatement = new SQLStatement(); insertstmt.sqlconnection = conn; // define the SQL text var sql:string = "INSERT INTO employees (firstname, lastname, salary) " + "VALUES ('Bob', 'Smith', 8000)"; insertstmt.text = sql; try // execute the statement insertstmt.execute(); trace("insert statement succeeded"); catch (error:sqlerror) trace("error message:", error.message); trace("details:", error.details); SQLResult SELECT SQL INSERT

163 SQL 155 SQLResult SQLStatement getresult() SQLResult Responder execute() SQLResult SQLResult lastinsertrowid SQL INSERT insertstmt.text = "INSERT INTO..."; insertstmt.addeventlistener(sqlevent.result, resulthandler); insertstmt.execute(); function resulthandler(event:sqlevent):void // get the primary key var result:sqlresult = insertstmt.getresult(); var primarykey:number = result.lastinsertrowid; // do something with the primary key insertstmt.text = "INSERT INTO..."; try insertstmt.execute(); // get the primary key var result:sqlresult = insertstmt.getresult(); var primarykey:number = result.lastinsertrowid; // do something with the primary key catch (error:sqlerror) // respond to the error INTEGER lastinsertrowid AUTOINCREMENT INTEGER lastinsertrowid INSERT lastinsertrowid INSERT SQLResult.lastInsertRowID INSERT INTEGER PRIMARY KEY INTEGER PRIMARY KEY ROWID _ROWID_ OID SQL INTEGER PRIMARY KEY INTEGER PRIMARY KEY ActionScript 3.0 SQL CREATE TABLE SQL SELECT INSERT SQLStatement text SQL UPDATE

164 SQL 156 DELETE ActionScript 3.0 SQL SQLConnection.attach() SQLConnection attach() name database-name.table-name SQL SQL SQLConnection SQLConnection SQLConnection SQL SQLConnection SQLConnection SQLConnection SQLConnection UPDATE DELETE SQL SQL SQL SQL SQL SQL SQL SQL

165 SQL 157 SQL SQL SQL SQL SQL SQL INSERT UPDATE null NULL SQL id id INSERT NULL NOT NULL NOT NULL String null NOT NULL CHECK UNIQUE SELECT

166 SQL 158 INSERT UPDATE ActionScript 3.0 SQL ON CONFLICT SQL UNIQUE SQL CREATE TABLE SQL SELECT INSERT NUMERIC INTEGER REAL NUMERIC SELECT Number String SQL ActionScript 3.0 SQL SQLConnection SQLConnection.open() SQLConnection.openAsync() open() openasync() SQLConnection

167 SQL 159 SELECT INSERT var conn:sqlconnection = new SQLConnection(); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); // open the database conn.open(dbfile, OpenMode.UPDATE); // start a transaction conn.begin(); // add the customer record to the database var insertcustomer:sqlstatement = new SQLStatement(); insertcustomer.sqlconnection = conn; insertcustomer.text = "INSERT INTO customers (firstname, lastname) " + "VALUES ('Bob', 'Jones')"; insertcustomer.execute(); var customerid:number = insertcustomer.getresult().lastinsertrowid; // add a related phone number record for the customer var insertphonenumber:sqlstatement = new SQLStatement(); insertphonenumber.sqlconnection = conn; insertphonenumber.text = "INSERT INTO customerphonenumbers (customerid, number) " + "VALUES (:customerid, ' ')"; insertphonenumber.parameters[":customerid"] = customerid; insertphonenumber.execute(); // commit the transaction conn.commit(); INSERT

168 SQL 160 var conn:sqlconnection = new SQLConnection(); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); // open the database conn.open(dbfile, SQLMode.UPDATE); // start a transaction conn.begin(); // add the customer record to the database var insertcustomer:sqlstatement = new SQLStatement(); insertcustomer.sqlconnection = conn; insertcustomer.text = "INSERT INTO customers (firstname, lastname) " + "VALUES ('Bob', 'Jones')"; insertcustomer.execute(); var customerid:number = insertcustomer.getresult().lastinsertrowid; // add a related phone number record for the customer var insertphonenumber:sqlstatement = new SQLStatement(); insertphonenumber.sqlconnection = conn; insertphonenumber.text = "INSERT INTO customerphonenumbers (customerid, number) " + "VALUES (:customerid, ' ')"; insertphonenumber.parameters[":customerid"] = customerid; insertphonenumber.execute(); // commit the transaction conn.commit(); try..catch..finally try catch finally try..catch..finally

169 SQL 161 var conn:sqlconnection = new SQLConnection(); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); // open the database conn.open(dbfile, SQLMode.UPDATE); // start a transaction conn.begin(); try // add the customer record to the database var insertcustomer:sqlstatement = new SQLStatement(); insertcustomer.sqlconnection = conn; insertcustomer.text = "INSERT INTO customers (firstname, lastname)" + "VALUES ('Bob', 'Jones')"; insertcustomer.execute(); var customerid:number = insertcustomer.getresult().lastinsertrowid; // add a related phone number record for the customer var insertphonenumber:sqlstatement = new SQLStatement(); insertphonenumber.sqlconnection = conn; insertphonenumber.text = "INSERT INTO customerphonenumbers (customerid, number)" + "VALUES (:customerid, ' ')"; insertphonenumber.parameters[":customerid"] = customerid; insertphonenumber.execute(); // if we've gotten to this point without errors, commit the transaction conn.commit(); catch (error:sqlerror) // rollback the transaction conn.rollback(); SQLStatement SQLStatement SQLStatement text SQL SQLStatement SQLStatement SQLStatement execute() SQLConnection SQLStatement execute() SQLConnection SQLStatement execute() result

170 SQL 162 // Using asynchronous execution mode var stmt1:sqlstatement = new SQLStatement(); stmt1.sqlconnection = conn; //... Set statement text and parameters, and register event listeners... stmt1.execute(); // At this point stmt1's execute() operation is added to conn's execution queue. var stmt2:sqlstatement = new SQLStatement(); stmt2.sqlconnection = conn; //... Set statement text and parameters, and register event listeners... stmt2.execute(); // At this point stmt2's execute() operation is added to conn's execution queue. // When stmt1 finishes executing, stmt2 will immediately begin executing // in the background. execute() execute() text parameters SQLConnection.begin() SQLConnection begin SQLStatement execute() begin SQLStatement.execute() SQL Adobe AIR AIR Adobe AIR 1.5 AIR SQL Adobe AIR 140 SQL 167 String ByteArray AIR ByteArray 179

171 SQL SQLConnection SQLConnection open() openasync() encryptionkey open() openasync() encryptionkey 16 ByteArray import flash.data.sqlconnection; import flash.data.sqlmode; import flash.events.sqlerrorevent; import flash.events.sqlevent; import flash.filesystem.file; var conn:sqlconnection = new SQLConnection(); conn.addeventlistener(sqlevent.open, openhandler); conn.addeventlistener(sqlerrorevent.error, errorhandler); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); var encryptionkey:bytearray = new ByteArray(); encryptionkey.writeutfbytes("some16bytestring"); // This technique is not secure! conn.openasync(dbfile, SQLMode.CREATE, null, false, 1024, encryptionkey); function openhandler(event:sqlevent):void trace("the database was created successfully"); function errorhandler(event:sqlerrorevent):void trace("error message:", event.error.message); trace("details:", event.error.details);

172 SQL 164 import flash.data.sqlconnection; import flash.data.sqlmode; import flash.filesystem.file; var conn:sqlconnection = new SQLConnection(); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); var encryptionkey:bytearray = new ByteArray(); encryptionkey.writeutfbytes("some16bytestring"); // This technique is not secure! try conn.open(dbfile, SQLMode.CREATE, false, 1024, encryptionkey); trace("the database was created successfully"); catch (error:sqlerror) trace("error message:", error.message); trace("details:", error.details); open() openasync() encryptionkey open() openasync() open() SQLError openasync() SQLConnection SQLErrorEvent error SQLError SQLError errorid 3138 ID

173 SQL 165 import flash.data.sqlconnection; import flash.data.sqlmode; import flash.events.sqlerrorevent; import flash.events.sqlevent; import flash.filesystem.file; var conn:sqlconnection = new SQLConnection(); conn.addeventlistener(sqlevent.open, openhandler); conn.addeventlistener(sqlerrorevent.error, errorhandler); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); var encryptionkey:bytearray = new ByteArray(); encryptionkey.writeutfbytes("some16bytestring"); // This technique is not secure! conn.openasync(dbfile, SQLMode.UPDATE, null, false, 1024, encryptionkey); function openhandler(event:sqlevent):void trace("the database opened successfully"); function errorhandler(event:sqlerrorevent):void if (event.error.errorid == 3138) trace("incorrect encryption key"); else trace("error message:", event.error.message); trace("details:", event.error.details);

174 SQL 166 import flash.data.sqlconnection; import flash.data.sqlmode; import flash.filesystem.file; var conn:sqlconnection = new SQLConnection(); var dbfile:file = File.applicationStorageDirectory.resolvePath("DBSample.db"); var encryptionkey:bytearray = new ByteArray(); encryptionkey.writeutfbytes("some16bytestring"); // This technique is not secure! try conn.open(dbfile, SQLMode.UPDATE, false, 1024, encryptionkey); trace("the database was created successfully"); catch (error:sqlerror) if (error.errorid == 3138) trace("incorrect encryption key"); else trace("error message:", error.message); trace("details:", error.details); 167 SQLConnection open() openasync() reencrypt() reencrypt() open() reencrypt() var newkey:bytearray = new ByteArray(); //... generate the new key and store it in newkey conn.reencrypt(newkey); openasync() reencrypt() reencrypt() SQLConnection reencrypt var newkey:bytearray = new ByteArray(); //... generate the new key and store it in newkey conn.addeventlistener(sqlevent.reencrypt, reencrypthandler); conn.reencrypt(newkey); function reencrypthandler(event:sqlevent):void // save the fact that the key changed reencrypt() reencrypt() reencrypt() null 16 ByteArray

175 SQL SSL salt 167 AIR HTML SWF AIR (AES) Counter with CBC-MAC (CCM) salt 167 AIR ActionScript EncryptionKeyGenerator 173 EncryptionKeyGenerator 169 EncryptionKeyGenerator EncryptionKeyGenerator EncryptionKeyGenerator

176 SQL 168 EncryptionKeyGenerator 1 EncryptionKeyGenerator ActionScript 3.0 (as3corelib) as3corelib SWC 2 EncryptionKeyGenerator as3corelib SWC 3 EncryptionKeyGenerator import import com.adobe.air.crypto.encryptionkeygenerator; 4 EncryptionKeyGenerator() EncryptionKeyGenerator var keygenerator:encryptionkeygenerator = new EncryptionKeyGenerator(); 5 var password:string = passwordinput.text; if (!keygenerator.validatestrongpassword(password)) // display an error message return; EncryptionKeyGenerator EncryptionKeyGenerator EncryptionKeyGenerator validatestrongpassword() 6 var encryptionkey:bytearray = keygenerator.getencryptionkey(password); getencryptionkey() 16 ByteArray getencryptionkey() 5 getencryptionkey() overridesaltelskey EncryptionKeyGenerator salt salt AIR (ELS) EncryptionKeyGenerator ELS ELS getencryptionkey() var customkey:string = "My custom ELS salt key"; var encryptionkey:bytearray = keygenerator.getencryptionkey(password, customkey); 7 getencryptionkey() SQLConnection open() openasync() openasync()

177 SQL 169 conn.addeventlistener(sqlevent.open, openhandler); conn.addeventlistener(sqlerrorevent.error, openerror); conn.openasync(dbfile, SQLMode.CREATE, null, false, 1024, encryptionkey); openerror() if ID EncryptionKeyGenerator.ENCRYPTED_DB_PASSWORD_ERROR_ID ID if (!createnewdb && event.error.errorid == EncryptionKeyGenerator.ENCRYPTED_DB_PASSWORD_ERROR_ID) statusmsg.text = "Incorrect password!"; else statusmsg.text = "Error creating or opening database."; 173 EncryptionKeyGenerator EncryptionKeyGenerator 167 EncryptionKeyGenerator EncryptionKeyGenerator ActionScript 3.0 (as3corelib) as3corelib EncryptionKeyGenerator getencryptionkey() getencryptionkey() passwordinput TextInput text password var password:string = passwordinput.text; EncryptionKeyGenerator getencryptionkey() password var keygenerator:encryptionkeygenerator = new EncryptionKeyGenerator(); var encryptionkey:bytearray = keygenerator.getencryptionkey(password); getencryptionkey() EncryptionKeyGenerator 8 32 STRONG_PASSWORD_PATTERN private static const STRONG_PASSWORD_PATTERN:RegExp = /(?=^.8,32$)((?=.*\d) (?=.*\W+))(?![.\n])(?=.*[A- Z])(?=.*[a-z]).*$/; EncryptionKeyGenerator validatestrongpassword()

178 SQL 170 public function vaidatestrongpassword(password:string):boolean if (password == null password.length <= 0) return false; return STRONG_PASSWORD_PATTERN.test(password)) getencryptionkey() validatestrongpassword() validatestrongpassword() getencryptionkey() getencryptionkey() concatenatepassword() var concatenatedpassword:string = concatenatepassword(password); concatenatepassword() private function concatenatepassword(pwd:string):string var len:int = pwd.length; var targetlength:int = 32; if (len == targetlength) return pwd; var repetitions:int = Math.floor(targetLength / len); var excess:int = targetlength % len; var result:string = ""; for (var i:uint = 0; i < repetitions; i++) result += pwd; result += pwd.substr(0, excess); return result; salt 256 salt salt salt salt salt getencryptionkey() 256 salt salt salt salt salt salt

179 SQL 171 var salt:bytearray = EncryptedLocalStore.getItem(saltKey); if (salt == null) salt = makesalt(); EncryptedLocalStore.setItem(saltKey, salt); salt makesalt() 256 ByteArray makesalt() Math.random() Math.random() 256 Math.random() uint uint uint uint 32 ByteArray uint 256 makesalt() private function makesalt():bytearray var result:bytearray = new ByteArray; for (var i:uint = 0; i < 8; i++) result.writeunsignedint(math.round(math.random() * uint.max_value)); return result; salt (ELS) ELS salt salt String salt EncryptionKeyGenerator ELS SALT_ELS_KEY ELS getencryptionkey() salt ELS saltkey EncryptedLocalStore.setItem() EncryptedLocalStore.getItem() XOR 256 salt salt XOR salt 256 XOR unhashedkey XOR xorbytes() var unhashedkey:bytearray = xorbytes(concatenatedpassword, salt); XOR (^) uint uint uint 32 xorbytes() String ByteArray (salt) 32 XOR private function xorbytes(passwordstring:string, salt:bytearray):bytearray var result:bytearray = new ByteArray(); for (var i:uint = 0; i < 32; i += 4) //... return result; passwordstring 32 4 uint (o1) charcodeat() (<<) uint o1 (<<) (i) 24 o1 8 (i + 1) 16 o1 8

180 SQL 172 //... // Extract 4 bytes from the password string and convert to a uint var o1:uint = passwordstring.charcodeat(i) << 24; o1 += passwordstring.charcodeat(i + 1) << 16; o1 += passwordstring.charcodeat(i + 2) << 8; o1 += passwordstring.charcodeat(i + 3); //... o1 passwordstring 32 readunsignedint() salt uint o2 //... salt.position = i; var o2:uint = salt.readunsignedint(); //... XOR 32 (uint) result ByteArray //... var xor:uint = o1 ^ o2; result.writeunsignedint(xor); //... XOR ByteArray //... return result; salt SHA-256 unhashedkey ByteArray salt ActionScript 3.0 (as3corelib) com.adobe.crypto SHA256 SHA256.hashBytes() ByteArray SHA String EncryptionKeyGenerator SHA256 var hashedkey:string = SHA256.hashBytes(unhashedKey); ByteArray SHA EncryptionKeyGenerator generateencryptionkey() 128 getencryptionkey() var encryptionkey:bytearray = generateencryptionkey(hashedkey); return encryptionkey;

181 SQL 173 generateencryptionkey() SHA String 128 ByteArray for String ByteArray SHA-256 String String 32 4 ByteArray 8 hash String (i) 17 position String substr() hex parseint() hex String int byte writebyte() byte result ByteArray result ByteArray 16 private function generateencryptionkey(hash:string):bytearray var result:bytearray = new ByteArray(); for (var i:uint = 0; i < 32; i += 2) var position:uint = i + 17; var hex:string = hash.substr(position, 2); var byte:int = parseint(hex, 16); result.writebyte(byte); return result; EncryptionKeyGenerator EncryptionKeyGenerator ActionScript 3.0 (as3corelib) as3corelib SWC FLA FLA instructions passwordinput openbutton statusmsg 1

182 SQL 174 import com.adobe.air.crypto.encryptionkeygenerator; const dbfilename:string = "encrypteddatabase.db"; var dbfile:file; var createnewdb:boolean = true; var conn:sqlconnection; init(); // Event handling function init():void passwordinput.displayaspassword = true; openbutton.addeventlistener(mouseevent.click, openconnection); statusmsg.setstyle("textformat", new TextFormat(null, null, 0x990000)); conn = new SQLConnection(); dbfile = File.applicationStorageDirectory.resolvePath(dbFileName); if (dbfile.exists) createnewdb = false; instructions.text = "Enter your database password to open the encrypted database."; openbutton.label = "Open Database"; else instructions.text = "Enter a password to create an encrypted database. The next time you open the application, you will need to re-enter the password to open the database again."; openbutton.label = "Create Database"; function openconnection(event:mouseevent):void var keygenerator:encryptionkeygenerator = new EncryptionKeyGenerator(); var password:string = passwordinput.text; if (password == null password.length <= 0) statusmsg.text = "Please specify a password."; return; if (!keygenerator.validatestrongpassword(password)) statusmsg.text = "The password must be 8-32 characters long. It must contain at least one lowercase letter, at least one uppercase letter, and at least one number or symbol."; return; passwordinput.text = ""; passwordinput.enabled = false; openbutton.enabled = false; var encryptionkey:bytearray = keygenerator.getencryptionkey(password); conn.addeventlistener(sqlevent.open, openhandler); conn.addeventlistener(sqlerrorevent.error, openerror);

183 SQL 175 conn.openasync(dbfile, SQLMode.CREATE, null, false, 1024, encryptionkey); function openhandler(event:sqlevent):void conn.removeeventlistener(sqlevent.open, openhandler); conn.removeeventlistener(sqlerrorevent.error, openerror); statusmsg.setstyle("textformat", new TextFormat(null, null, 0x009900)); if (createnewdb) statusmsg.text = "The encrypted database was created successfully."; else statusmsg.text = "The encrypted database was opened successfully."; function openerror(event:sqlerrorevent):void conn.removeeventlistener(sqlevent.open, openhandler); conn.removeeventlistener(sqlerrorevent.error, openerror); if (!createnewdb && event.error.errorid == EncryptionKeyGenerator.ENCRYPTED_DB_PASSWORD_ERROR_ID) statusmsg.text = "Incorrect password!"; else statusmsg.text = "Error creating or opening database."; SQL SQL AIR SQL AIR AIR File.applicationDirectory AIR

184 SQL 176 Adobe AIR SQL SQL SELECT Adobe AIR SQL SQL SQLStatement SQL SQLStatement SQLStatement.execute() execute() SQLStatement.text SQLStatement.parameters SQLStatement text 147 SQLStatement SQLStatement SQLStatement SQLStatement SQLStatement SQL SQLStatement SQLStatement SQLStatement ActionScript JavaScript execute() SQL INSERT UPDATE SQL main SELECT employeeid FROM main.employees SELECT employeeid FROM employees SQLConnection SQLConnection SQL SELECT INSERT SELECT 152 SELECT

185 SQL 177 SQLConnection.compact() compact() SQL SQL 176 SQLConnection open() openasync() 145 SQLConnection SQL INSERT SELECT SELECT 152 SELECT SQL SQLStatement SQL 161 SQL SQLStatement text SQL SQL SQLStatement SQL SQLStatement SQL SQLStatement execute() SQL SQLStatement text 176 SQL SQLStatement

186 SQL 178 SQLStatement SQL SQL 147 SQLStatement itemclass String

187 : Adobe AIR AIR AIR AIR AIR SQL 162 SQL Web Windows DPAPI Mac OS KeyChain Linux KeyRing KWallet AIR AES-CBC 128 AIR EncryptedLocalStore setitem() removeitem() var str:string = "Bob"; var bytes:bytearray = new ByteArray(); bytes.writeutfbytes(str); EncryptedLocalStore.setItem("firstName", bytes); var storedvalue:bytearray = EncryptedLocalStore.getItem("firstName"); trace(storedvalue.readutfbytes(storedvalue.length)); // "Bob" setitem() stronglybound true AIR ID var str:string = "Bob"; var bytes:bytearray = new ByteArray(); bytes.writeutfbytes(str); EncryptedLocalStore.setItem("firstName", bytes, true); stronglybound true getitem() AIR AIR getitem() Error AIR stronglybound ID stronglybound false 269 EncryptedLocalStore.removeItem() EncryptedLocalStore.removeItem("firstName"); EncryptedLocalStore.reset() EncryptedLocalStore.reset();

188 180 AIR Debug Launcher (ADL) 10MB AIR Adobe/AIR/ELS/ ID

189 : HTML Adobe AIR Safari Web WebKit ( HTML JavaScript HTML AIR API HTML JavaScript HTMLLoader HTML HTML HTML CSS DOM JavaScript WebKit AIR HTML Web AIR AIR API AIR http: https: AIR API Web AIR Safari Web WebKit ( HTML JavaScript AIR API Adobe AIR Adobe Flash Player API Alpha AIR HTML SWF PDF HTML SWF PDF 52 HTML Adobe AIR HTML JavaScript JavaScript JavaScript AIR HTMLLoader HTML HTMLLoader HTML NativeWindow SWF Sprite HTMLLoader 215 HTML Flex 3 ActionScript ActionScript JavaScript AIR JavaScript AIR AIR HTMLLoader

190 HTML 182 AIR NativeWindow HTMLLoader JavaScript htmlloader native4window h1 div p JavaScript Document Window JavaScript runtime nativewindow htmlloader AIR ActionScript HTMLLoader window JavaScript JavaScript Window ActionScript JavaScript AIR JavaScript runtime AIR API AIR AIR API runtime File var file = new window.runtime.filesystem.file(); AIR SDK JavaScript AIRAliases.js AIR air.class window.runtime.package.class new air.file() File NativeWindow window.nativewindow HTML NativeWindow HTMLLoader window.htmlloader HTML HTMLLoader htmlloader nativewindow runtime frame iframe frame parent.runtime runtime

191 HTML 183 AIR HTML JavaScript AIR API load JavaScript frame iframe frame AIR sandboxroot documentroot sandboxroot mash-up AIR API frame iframe parentsandboxbridge childsandboxbridge 26 HTML 189 HTML frame iframe AIR Adobe Acrobat Acrobat Adobe Reader 8.1 PDF HTMLLoader PDF SWF HTML AIR AIR Webkit 26 HTML 184 HTML 189 HTML frame iframe 188 JavaScript Window 184 XMLHttpRequest 227 PDF AIR Webkit Adobe AIR Safari Web Webkit AIR Webkit HTML CSS JavaScript W3C AIR Webkit HTML CSS JavaScript developer.apple.com W3C Mozilla HTML CSS DOM Webkit Mozilla AIR WebKit JavaScript Window print() Acrobat Adobe Reader 8.1+ (SVG) CSS opacity AIR JavaScript AIR JavaScript AIR JavaScript Web AIR 195 JavaScript

192 HTML 184 HTML AIR Web Adobe Flash Player AIR AIR 24 HTML JavaScript AIR API JavaScript app: URL Internet frame iframe HTML AIR JavaScript eval() eval() JSON 27 eval() load HTML script JavaScript XMLHttpRequest AIR XMLHttpRequest (XHR) xmlhttp = new XMLHttpRequest(); xmlhttp.open("get", " true); xmlhttp.onreadystatechange = function() if (xmlhttp.readystate == 4) //do something with data... xmlhttp.send(null); AIR JSON XHR XHR XHR XHR

193 HTML 185 AIR XMLHttpRequest frame frame iframe AIR allowcrossdomainxhr true <iframe id="mashup" src=" allowcrossdomainxhr="true" </iframe> AIR URLStream frame iframe XMLHttpRequest URL XHR iframe example.com <iframe id="mashup" src=" documentroot="app:/sandbox/" sandboxroot=" allowcrossdomainxhr="true" </iframe> sandboxroot URL XMLHttpRequest sandboxroot URL iframe <iframe id="mashup" src=" documentroot="app:/sandbox/" sandboxroot=" allowcrossdomainxhr="true" </iframe> air 189 HTML frame iframe 26 HTML Canvas Canvas API Canvas API Canvas JavaScript Canvas API Canvas Canvas

194 HTML 186 <html> <body> <canvas id="trianglecanvas" style="width:40px; height:40px;"></canvas> <script> var canvas = document.getelementbyid("trianglecanvas"); var context = canvas.getcontext("2d"); context.linewidth = 3; context.strokestyle = "#457232"; context.beginpath(); context.moveto(5,5); context.lineto(35,5); context.lineto(20,35); context.lineto(5,5); context.lineto(6,5); context.stroke(); </script> </body> </html> Canvas API Apple Safari JavaScript Reference Webkit Canvas API Web (WHATWG) W3C HTML 5 Safari JavaScript Reference AIR Canvas Cookie AIR http: https: cookie document.cookie AIR API EncryptedLocalStore FileStream Clipboard WebKit Clipboard API copy cut paste clipboarddata clipboarddata cleardata(mimetype) getdata(mimetype) setdata(mimetype, data) mimetype MIME paste mimetype MIME mimetype MIME JavaScript AIR Clipboard var clipping = air.clipboard.generalclipboard.getdata("text/plain", air.clipboardtransfermode.original_only); MIME MIME HTML URL "text/plain" "text/html" "text/uri-list" "image/x-vnd.adobe.air.bitmap" "application/x-vnd.adobe.air.file-list"

195 HTML Using the Pasteboard from JavaScript Apple HTML DOM dragstart drag dragend dragenter dragover dragleave drop datatransfer datatransfer clipboarddata drop function ondrop(dragevent) return dragevent.datatransfer.getdata("text/plain", air.clipboardtransfermode.original_only); datatransfer cleardata(mimetype) getdata(mimetype) setdata(mimetype, data) effectsallowed dropeffect mimetype MIME drop mimetype MIME mimetype MIME datatransfer MIME dragstart effectsallowed dragenter dropeffect dropeffect effectsallowed AIR 113 Using the Drag-and-Drop from JavaScript Apple innerhtml outerhtml AIR innerhtml outerhtml load load innerhtml outerhtml innerhtml outerhtml innerhtml outerhtml <script> 26 HTML Document.write() Document.writeln() load write() writeln() document.write() writeln() Web

196 HTML 188 Document.designMode document.designmode on designmode on body contenteditable true HTML contenteditable 192 HTML contenteditable unload body frameset frameset body unload NativeApplication exiting NativeWindow closing JavaScript ("Goodbye.") var app = air.nativeapplication.nativeapplication; app.addeventlistener(air.event.exiting, closehandler); function closehandler(event) alert("goodbye."); frame iframe unload Adobe AIR JavaScript Window Window JavaScript AIR JavaScript Window AIR Window.runtime runtime AIR Flash Player API Flex AIR var preferencesfile = new window.runtime.flash.filesystem.file(); AIR SDK AIRAliases.js AIRAliases.js File var preferencesfile = new air.file(); window.runtime frame iframe 199 AIRAliases.js Window.nativeWindow nativewindow Window window.nativewindow.close(); NativeWindow JavaScript Window window.nativewindow frame iframe Window.htmlLoader htmlloader HTML AIR HTMLLoader HTML htmlloader.paintsdefaultbackground window.htmlloader.paintsdefaultbackground = false; HTMLLoader window HTML JavaScript Window HTMLLoader JavaScript

197 HTML 189 window.htmlloader frame iframe Window.parentSandboxBridge Window.childSandboxBridge parentsandboxbridge childsandboxbridge 206 Window.setTimeout() Window.setInterval() AIR settimeout() setinterval() settimeout() setinterval() 197 settimeout() setinterval() Window.open() open() 30 JavaScript window.open() air.nativeapplication NativeApplication NativeApplication NativeApplication.nativeApplication JavaScript var app = window.runtime.flash.desktop.nativeapplication.nativeapplication; AIRAliases.js var app = air.nativeapplication.nativeapplication; NativeApplication 249 NativeApplication JavaScript URL JavaScript URL href="javascript:alert('test')" HTML AIR WebKit HTML 189 HTML frame iframe 191 HTML Canvas 191 HTML HTML frame iframe AIR frame iframe sandboxroot sandboxroot src sandboxroot URL XMLHttpRequest documentroot documentroot sandboxroot URL src URL sandboxroot URL documentroot frame

198 HTML 190 <iframe src=" documentroot="app:/sandbox/" sandboxroot=" child.html sandbox child.html URL sandbox AIR app:/sandbox/ allowcrossdomainxhr allowcrossdomainxhr="allowcrossdomainxhr" XMLHttpRequest XHR XHR allowcrossdomainxhr frame iframe XHR 0 f n allowcrossdomainxhr deny XHR ondominitialize dominitialize AIR dominitialize dominitialize AIR iframe child.html <iframe src=" documentroot="app:/sandbox/" sandboxroot=" XMLHttpRequest child.html <iframe src=" documentroot="app:/sandbox/" sandboxroot=" XMLHttpRequest child.html <iframe src=" documentroot="app:/sandbox/" sandboxroot=" allowcrossdomainxhr="allowcrossdomainxhr"/> child.html <iframe src="file:///templates/child.html" documentroot="app:/sandbox/" sandboxroot="app-storage:/templates/"/> dominitialize child.html

199 HTML 191 <html> <head> <script> var bridgeinterface = ; bridgeinterface.testproperty = "Bridge engaged"; function engagebridge() document.getelementbyid("sandbox").parentsandboxbridge = bridgeinterface; </script> </head> <body> <iframe id="sandbox" src=" documentroot="app:/" sandboxroot=" ondominitialize="engagebridge()"/> </body> </html> child.html <html> <head> <script> document.write(window.parentsandboxbridge.testproperty); </script> </head> <body></body> </html> HTML HTML Canvas Webkit Canvas API JavaScript <canvas id="drawingatrium" style="width:300px; height:300px;"></canvas> 185 Canvas HTML AIR Webkit DOM DOM oncontextmenu oncopy oncut ondominitialize ondrag ondragend ondragenter Command frame iframe DOM DOM

200 HTML 192 ondragleave ondragover ondragstart ondrop onerror oninput onpaste onscroll onsearch (?Apple docs correct?) onselectstart HTML contenteditable HTML contenteditable HTML p <html> <head/> <body contenteditable="true"> <h1>de Finibus Bonorum et Malorum</h1> <p contenteditable="false">sed ut perspiciatis unde omnis iste natus error.</p> <p>at vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis.</p> </body> </html> document.designmode on contenteditable designmode off contenteditable true 188 Document.designMode CSS WebKit CSS WebKit AIR WebKit CSS -webkit-border-horizontal-spacing -webkit-border-vertical-spacing -webkit-line-break after-white-space normal (CJK) -webkit-margin-bottom-collapse collapse discard separate -webkit-margin-collapse collapse discard separate -webkit-margin-start

201 HTML 193 CSS -webkit-margin-top-collapse collapse discard separate -webkit-nbsp-mode normal space -webkit-padding-start -webkit-rtl-ordering logical visual -webkit-text-fill-color -webkit-text-security circle disc none square -webkit-user-drag auto element -webkit-user-modify -webkit-user-select none read-only read-write read-writeplaintext-only auto none text Apple Safari CSS Reference (

202 : HTML JavaScript HTML JavaScript Adobe AIR HTML AIR HTMLLoader mx:html Flex HTML JavaScript SWF AIR HTMLLoader Adobe AIR HTMLLoader AIR HTML SWF HTMLLoader HTMLLoader.createRootWindow() HTML HTMLLoader JavaScript window.htmlloader HTML HTMLLoader URL HTML URL HTMLLoader HTMLLoader HTML import flash.html.htmlloader; var html:htmlloader = new HTMLLoader; html.width = 400; html.height = 600; var urlreq:urlrequest = new URLRequest(" html.load(urlreq); HTMLLoader width height 0 HTMLLoader HTMLLoader 210 HTML TextField HTML Adobe Flash Player TextField HTML Flash Player Adobe AIR HTMLLoader HTML HTMLLoader loadstring() HTML HTMLLoader var html:htmlloader = new HTMLLoader(); var htmlstr:string = "<html><body>hello <b>world</b>.</body></html>"; html.loadstring(htmlstr); loadstring() XMLHttpRequest window.location "about:blank" window.runtime

203 HTML JavaScript 195 AIR 1.5 HTMLLoader placeloadstringcontentinapplicationsandbox HTMLLoader true loadstring() false loadstring() window.runtime AIR API true loadstring() true HTML true AIR 1.0 AIR 1.1 SDK loadstring() AIR HTML AIR AIR API AIR API eval() API Ajax eval() API AIR 24 AIR API Web eval() AIR API AIR API 206 JavaScript Adobe AIR runtime security violation for JavaScript code in the application security sandbox JavaScript Adobe AIR 195 JavaScript 26 HTML JavaScript JavaScript Adobe AIR runtime security violation for JavaScript code in the application security sandbox JavaScript Adobe AIR JavaScript load load JavaScript JavaScript eval() settimeout() setinterval() Function JavaScript JavaScript javascript: URL innerhtml outerhtml onevent

204 HTML JavaScript 196 JavaScript document.write() document.writeln() load load XMLHttpRequests 27 Adobe Ajax JavaScript JavaScript 207 AIR API 207 eval() eval() load load eval() eval() eval("obj." + propname + " = " + val); obj[propname] = val; function compile(var1, var2) eval("var fn = function() this."+var1+"(var2) "); return fn; function compile(var1, var2) var self = this; return function() self[var1](var2) ; JavaScript

205 HTML JavaScript 197 var CustomClass = Utils: Parser: function() alert('constructor'), Data: ; var constructorclassname = "CustomClass.Utils.Parser"; eval() var myobj; eval('myobj=new ' + constructorclassname +'()') eval() function getter(str) var obj = window; var names = str.split('.'); for(var i=0;i<names.length;i++) if(typeof obj[names[i]]=='undefined') var undefstring = names[0]; for(var j=1;j<=i;j++) undefstring+="."+names[j]; throw new Error(undefstring+" is undefined"); obj = obj[names[i]]; return obj; try var Parser = getter(constructorclassname); var a = new Parser(); catch(e) alert(e); settimeout() setinterval() settimeout("alert('timeout')", 10); settimeout(alert('timeout'), 10); this this.apptimer = setinterval("obj.customfunction();", 100); var _self = this; this.apptimer = setinterval(function()obj.customfunction.apply(_self);, 100);

206 HTML JavaScript 198 Function new Function(param, body) load javascript: URL javascript: URL JavaScript javascript: URL <a href="javascript:code()">click Me</a> <a href="#" onclick="code()">click Me</a> innerhtml outerhtml onevent innerhtml outerhtml DOM onclick onmouseover id addeventlistener() <div id="container"></div> document.getelementbyid('container').innerhtml = '<a href="#" onclick="code()">click Me.</a>'; document.getelementbyid('container').innerhtml = '<a href="#" id="smith">click Me.</a>'; document.getelementbyid('smith').addeventlistener("click", function() code(); ); JavaScript 207 document.write() document.writeln() load document.write() document.writeln() DOM load load XMLHttpRequests load load XMLHttpRequests XMLHttpRequests load load XMLHttpRequests innerhtml document.createelement()

207 HTML JavaScript 199 JavaScript AIR API Webkit HTML JavaScript AIR SQL AIR API File flash.filesystem JavaScript File var myfile = new window.runtime.flash.filesystem.file(); runtime JavaScript AIR HTML JavaScript runtime flash Flash runtime flash.filesystem flash.filesystem File ActionScript frame iframe runtime runtime JavaScript window.runtime.flash.desktop.nativeapplication AIR SDK AIRAliases.js air.nativeapplication AIR API HTML Flash Player API HTML Adobe AIR SWF (Flash Player) ActionScriptJavaScript ActionScript ECMAScript JavaScript HTML ActionScript SWF JavaScript Dictionary XML XMLList ActionScript AIRAliases.js window.runtime.flash.desktop.nativeapplication window.runtime.flash.desktop.clipboardmanager window.runtime.flash.filesystem.filestream window.runtime.flash.data.sqldatabase AIR SDK AIRAliases.js air.nativeapplication air.clipboard air.filestream air.sqldatabase

208 HTML JavaScript 200 AIRAliases.js HTML Adobe AIR AIRAliases.js window.runtime.trace() window.runtime.flash.net.navigatetourl() window.runtime.flash.net.sendtourl() air.trace() air.navigatetourl() air.sendtourl() AIRAliases.js HTML script <script src="airaliases.js"></script> src JavaScript HTML AIRAliases.js AIR URL AIR HTML img frame iframe script src link href URL URL URL file file:///c:/air Test/test.txt app app:/images app-storage AIR app-storage:/settings/prefs.xml http HTTP https HTTPS AIR URL 254 URL AIR URL AIR API File Loader URLStream Sound URLRequest URL URLRequest URL URLRequest Adobe var urlreq = new air.urlrequest(" URLRequest 253 URL ActionScript JavaScript HTMLLoader HTML JavaScript HTML window.runtime window.htmlloader window.nativewindow ActionScript JavaScript ActionScript JavaScript ActionScript JavaScript ActionScript HTML window

209 HTML JavaScript 201 var html:htmlloader = new HTMLLoader(); var foo:string = "Hello from container SWF." function hellofromjs(message:string):void trace("javascript says:", message); var urlreq:urlrequest = new URLRequest("test.html"); html.addeventlistener(event.complete, loaded); html.load(urlreq); function loaded(e:event):void html.window.foo = foo; html.window.hellofromjs = hellofromjs; HTMLLoader HTML test.html SWF foo hellofromjs() <html> <script> function alertfoo() alert(foo); </script> <body> <button onclick="alertfoo()"> What is foo? </button> <p><button onclick="hellofromjs('hi.')"> Call hellofromjs() function. </button></p> </body> </html> JavaScript htmldominitialize complete load JavaScript ActionScript JavaScript HTML JavaScript HTMLLoader runtimeapplicationdomain runtimeapplicationdomain ApplicationDomain.currentDomain html.runtimeapplicationdomain = ApplicationDomain.currentDomain; runtimeapplicationdomain JavaScript JavaScript window.runtime new var customclassobject = new window.runtime.customclass(); HTML HTML Internet ApplicationDomain.currentDomain

210 HTML JavaScript 202 JavaScript SWF JavaScript The application attempted to reference a JavaScript object in an HTML page that is no longer loaded HTML JavaScript AIR 214 HTML ActionScript HTML DOM JavaScript HTMLLoader complete HTML DOM div p JavaScript complete JavaScript load complete DOM complete HTML DOM HTML <html> <script> foo = 333; function test() return "OK."; </script> <body> <p id="p1">hi.</p> </body> </html> HTML foo JavaScript test() JavaScript window window.document P ID p1 getelementbyid() HTMLLoader complete ActionScript ActionScript var html:htmlloader = new HTMLLoader(); html.width = 300; html.height = 300; html.addeventlistener(event.complete, completehandler); var xhtml:xml = <html> <script> foo = 333; function test() return "OK."; </script> <body> <p id="p1">hi.</p> </body> </html>; html.loadstring(xhtml.tostring()); function completehandler(e:event):void trace(html.window.foo); // 333 trace(html.window.document.getelementbyid("p1").innerhtml); // Hi. trace(html.window.test()); // OK.

211 HTML JavaScript 203 HTML innerhtml html.window.document.getelementbyid("p1").innerhtml p1 HTML ActionScript HTML HTMLLoader p1 foo JavaScript html.window.document.getelementbyid("p1").innerhtml = "Goodbye"; html.window.foo = 66; HTML SWF AIR HTML SWF object embed SWF Web object embed HTML SWF AIR W3C object AIR HTML object embed HTML object HTML SWF SWF AIR URL SWF AIR <object type="application/x-shockwave-flash" width="100%" height="100%"> <param name="movie" value="app:/swffile.swf"></param> </object> object urlstring SWF elementid ID <script> function showswf(urlstring, elementid) var displaycontainer = document.getelementbyid(elementid); displaycontainer.appendchild(createswfobject(urlstring,650,650)); function createswfobject(urlstring, width, height) var SWFObject = document.createelement("object"); SWFObject.setAttribute("type","application/x-shockwave-flash"); SWFObject.setAttribute("width","100%"); SWFObject.setAttribute("height","100%"); var movieparam = document.createelement("param"); movieparam.setattribute("name","movie"); movieparam.setattribute("value",urlstring); SWFObject.appendChild(movieParam); return SWFObject; </script> HTML ActionScript AIR HTML SWF ActionScript myclasses.swf lib HTML script <script src="lib/myclasses.swf" type="application/x-shockwave-flash"></script> type="application/x-shockwave-flash" SWF Flash Player 10 AIR 1.5 SWF XML AIR

212 HTML JavaScript 204 AIR lib myclasses.swf JavaScript Window runtime var libraryobject = new window.runtime.libraryclass(); SWF LibraryClass utilities var libraryobject = new window.runtime.utilities.libraryclass(); ActionScript SWF AIR HTML acompc acompc Flex 3 SDK Flex 3 SDK ActionScript HTML DOM JavaScript <script> SWF ActionScript HTML JavaScript window document ActionScript JavaScript HTML <html> <script src="aslibrary.swf" type="application/x-shockwave-flash"></script> <script> num = 254; function getstatus() return "OK."; function runasfunction(window) var obj = new runtime.asclass(); obj.accessdom(window); </script> <body onload="runasfunction"> <p id="p1">body text.</p> </body> </html> HTML num JavaScript getstatus() JavaScript window window.document P ID p1 ActionScript ASLibrary.swf ASClass ASClass accessdom() JavaScript accessdom() JavaScript Window Window DOM public class ASClass public function accessdom(window:*):void trace(window.num); // 254 trace(window.document.getelementbyid("p1").innerhtml); // Body text.. trace(window.getstatus()); // OK. ActionScript HTML p1 foo JavaScript public function modifydom(window:*):void window.document.getelementbyid("p1").innerhtml = "Bye"; window.foo = 66;

213 HTML JavaScript 205 Date RegExp JavaScript ActionScript Date RegExp Date RegExp ActionScript jsdate JavaScript Date ActionScript Date var asdate:date = new Date(jsDate.getMilliseconds()); ActionScript jsregexp JavaScript RegExp ActionScript RegExp var flags:string = ""; if (jsregexp.dotall) flags += "s"; if (jsregexp.extended) flags += "x"; if (jsregexp.global) flags += "g"; if (jsregexp.ignorecase) flags += "i"; if (jsregexp.multiline) flags += "m"; var asregexp:regexp = new RegExp(jsRegExp.source, flags); ActionScript HTML HTMLLoader complete CSS HTML <html> <style>.style1a font-family:arial; font-size:12px.style1b font-family:arial; font-size:24px </style> <style>.style2 font-family:arial; font-size:12px </style> <body> <p class="style1a"> Style 1A </p> <p class="style1b"> Style 1B </p> <p class="style2"> Style 2 </p> </body> </html> HTMLLoader window.document.stylesheets cssrules CSS

214 HTML JavaScript 206 var html:htmlloader = new HTMLLoader( ); var urlreq:urlrequest = new URLRequest("test.html"); html.load(urlreq); html.addeventlistener(event.complete, completehandler); function completehandler(event:event):void var stylesheet0:object = html.window.document.stylesheets[0]; stylesheet0.cssrules[0].style.fontsize = "32px"; stylesheet0.cssrules[1].style.color = "#FF0000"; var stylesheet1:object = html.window.document.stylesheets[1]; stylesheet1.cssrules[0].style.color = "blue"; stylesheet1.cssrules[0].style.font-family = "Monaco"; CSS HTML HTMLLoader complete AIR JavaScript AIR AIR frame iframe example.com example.com JavaScript AIR API AIR XMLHttpRequest 189 HTML frame iframe 26 HTML 184 XMLHttpRequest

215 HTML JavaScript 207 frame iframe AIR frame sandboxroot documentroot sandboxroot URL documentroot sandboxroot URL sandboxroot URL file: http: https: URL URL documentroot file: app: app-storage: URL sandbox <iframe src=" sandboxroot=" documentroot="app:/sandbox/"> </iframe> ui.html sandbox javascript <script src=" <script src=" sandboxroot URL URL AIR XMLHttpRequest window childsandboxbridge parentsandboxbridge childsandboxbridge childsandbox var interface = ; interface.calculateprice = function() return ".45 cents"; interface.storeid = "abc" window.childsandboxbridge = interface; iframe ID child frame childsandboxbridge var childinterface = document.getelementbyid("child").contentwindow.childsandboxbridge; air.trace(childinterface.calculateprice()); //traces ".45 cents" air.trace(childinterface.storeid)); //traces "abc"

216 HTML JavaScript 208 parentsandboxbridge parentsandbox frame var interface = ; interface.save = function(text) var savefile = air.file("app-storage:/save.txt"); //write text to file document.getelementbyid("child").contentwindow.parentsandboxbridge = interface; frame save.txt save var texttosave = "A string."; window.parentsandboxbridge.save(texttosave); DOM DOM Window frame iframe dominitialize dominitialize frame dominitialize <html> <head> <script> var bridgeinterface = ; bridgeinterface.testproperty = "Bridge engaged"; function engagebridge() document.getelementbyid("sandbox").contentwindow.parentsandboxbridge = bridgeinterface; </script> </head> <body> <iframe id="sandbox" src=" documentroot="app:/" sandboxroot=" ondominitialize="engagebridge()"/> </body> </html> child.html <html> <head> <script> document.write(window.parentsandboxbridge.testproperty); </script> </head> <body></body> </html> dominitialize window.open() window

217 HTML JavaScript 209 var childwindow = window.open(); childwindow.addeventlistener("dominitialize", engagebridge()); childwindow.document.location = " child.html HTMLLoader createrootwindow() createrootwindow()

218 : HTML Adobe AIR (DOM) 3 HTMLLoader HTMLLoader Adobe ActionScript 3.0 htmldominitialize complete htmlboundschanged locationchange scroll uncaughtscriptexception HTML DOM HTML DOM HTML onload contentwidth / contentheight HTMLLoader location HTML Scroll # window.scrollto() scroll HTMLLoader JavaScript JavaScript JavaScript onclick ActionScript 210 ActionScript DOM ActionScript DOM ActionScript JavaScript HTML <html> <body> <a href="#" id="testlink">click me.</a> </html> ActionScript clickhandler() HTML testlink onclick

219 HTML 211 var html:htmlloader = new HTMLLoader( ); var urlreq:urlrequest = new URLRequest("test.html"); html.load(urlreq); html.addeventlistener(event.complete, completehandler); function completehandler(event:event):void html.window.document.getelementbyid("testlink").onclick = clickhandler; function clickhandler():void trace("you clicked it!"); addeventlistener() completehandler() function completehandler(event:event):void var testlink:object = html.window.document.getelementbyid("testlink"); testlink.addeventlistener("click", clickhandler); DOM HTMLLoader complete HTML HTML DOM HTMLLoader complete JavaScript HTML <html> <head> <script> function throwerror() var x = 400 * melbatoast; </script> </head> <body> <a href="#" onclick="throwerror()">click me.</a> </html> JavaScript throwerror() melbatoast var x = 400 * melbatoast; JavaScript try/catch JavaScript HTMLLoader HTMLUncaughtScriptExceptionEvent

220 HTML 212 var html:htmlloader = new HTMLLoader(); var urlreq:urlrequest = new URLRequest("test.html"); html.load(urlreq); html.width = container.width; html.height = container.height; container.addchild(html); html.addeventlistener(htmluncaughtscriptexceptionevent.uncaught_script_exception, htmlerrorhandler); function htmlerrorhandler(event:htmluncaughtjavascriptexceptionevent):void event.preventdefault(); trace("exceptionvalue:", event.exceptionvalue) for (var i:int = 0; i < event.stacktrace.length; i++) trace("sourceurl:", event.stacktrace[i].sourceurl); trace("line:", event.stacktrace[i].line); trace("function:", event.stacktrace[i].functionname); JavaScript window.htmlloader <html> <head> <script language="javascript" type="text/javascript" src="airaliases.js"></script> <script> function throwerror() var x = 400 * melbatoast; function htmlerrorhandler(event) event.preventdefault(); var message = "exceptionvalue:" + event.exceptionvalue + "\n"; for (var i = 0; i < event.stacktrace.length; i++) message += "sourceurl:" + event.stacktrace[i].sourceurl +"\n"; message += "line:" + event.stacktrace[i].line +"\n"; message += "function:" + event.stacktrace[i].functionname + "\n"; alert(message); window.htmlloader.addeventlistener("uncaughtscriptexception", htmlerrorhandler); </script> </head> <body> <a href="#" onclick="throwerror()">click me.</a> </html> htmlerrorhandler() JavaScript AIR trace HTMLUncaughtScriptExceptionEvent exceptionvalue stacktrace exceptionvalue: ReferenceError: Can't find variable: melbatoast sourceurl: app:/test.html line: 5 function: throwerror sourceurl: app:/test.html line: 10 function: onclick

221 HTML 213 JavaScript addeventlistener() addeventlistener() closing window.nativewindow.addeventlistener(air.nativewindow.closing, handlewindowclosing); HTML movehandler() move NativeWindowBoundsEvent <html> <script src="airaliases.js" /> <script> function init() writevalues(); window.nativewindow.addeventlistener(air.nativewindowboundsevent.move, movehandler); function writevalues() document.getelementbyid("xtext").value = window.nativewindow.x; document.getelementbyid("ytext").value = window.nativewindow.y; function movehandler(event) air.trace(event.type); // move writevalues(); </script> <body onload="init()" /> <table> <tr> <td>window X:</td> <td><textarea id="xtext"></textarea></td> </tr> <tr> <td>window Y:</td> <td><textarea id="ytext"></textarea></td> </tr> </table> </body> </html> textarea X Y movehandler() event type move removeeventlistener() eventname listener addeventlistener()

222 HTML 214 HTML HTML HTML HTML HTML JavaScript (The application attempted to reference a JavaScript object in an HTML page that is no longer loaded.) HTML JavaScript HTMLLoader window unload JavaScript uncaughtscriptexception window.onunload = cleanup; window.htmlloader.addeventlistener('uncaughtscriptexception', uncaughtscriptexception); function cleanup() window.htmlloader.removeeventlistener('uncaughtscriptexception', uncaughtscriptexceptionhandler); HTML cleanup NativeWindow (window.nativewindow) closing JavaScript uncaughtscriptexception window.nativewindow.addeventlistener(air.event.closing, cleanup); function cleanup() window.htmlloader.removeeventlistener('uncaughtscriptexception', uncaughtscriptexceptionhandler); JavaScript HTMLLoader createrootwindow() html complete complete removeeventlistener() var html = runtime.flash.html.htmlloader.createrootwindow(true); html.addeventlistener('complete', htmlcompletelistener); function htmlcompletelistener() html.removeeventlistener(complete, arguments.callee) // handler code.. html.load(new runtime.flash.net.urlrequest("second.html")); haseventlistener()

223 : HTML Adobe AIR HTMLLoader HTML Sprite ActionScript 3.0 HTML HTMLHost HTMLLoader HTMLLoader HTMLHost HTML HTMLHost AIR HTML HTMLHost defaultbehavior true HTMLHost HTMLHost HTMLLoader htmlhost HTMLHost HTMLLoader HTMLLoader HTMLLoader Adobe Flash Player Sprite HTML SWF PDF HTML HTML HTMLLoader HTMLLoader HTML HTMLLoader x y width height visible HTML HTMLLoader width height 0 HTML HTML HTMLLoader HTML CSS HTMLLoader HTMLLoader width 0 contentwidth contentheight HTMLLoader HTML CSS HTMLLoader HTMLLoader scalex scaley

224 HTML 216 HTMLLoader HTMLLoader paintsdefaultbackground true HTMLLoader paintsdefaultbackground false HTMLLoader HTML body HTML style="background-color:gray" HTML HTMLLoader opaquebackground paintsdefaultbackground false opaquebackground PNG HTML Alpha HTML HTMLLoader HTMLLoader 1.0 HTMLLoader HTMLLoader HTMLLoader scalemode StageScaleMode.NO_SCALE HTML SWF PDF HTMLLoader SWF PDF HTMLLoader 1.0 HTMLLoader alpha 1.0 HTMLLoader SWF PDF HTMLLoader 203 HTML SWF 227 PDF HTMLLoader HTMLLoader alpha filters graphics opaquebackground HTML HTML HTML paintsdefaultbackground false paintsdefaultbackground false

225 HTML 217 rotation scalex scaley transform HTMLLoader HTML SWF PDF 1 HTML SWF PDF HTML HTML HTML SWF PDF filters HTML var html:htmlloader = new HTMLLoader(); var urlreq:urlrequest = new URLRequest(" html.load(urlreq); html.width = 800; html.height = 600; var blur:blurfilter = new BlurFilter(8); var filters:array = [blur]; html.filters = filters; HTML HTMLLoader HTML contentheight contentwidth scrollh scrollv HTML HTML HTMLLoader HTML HTMLLoader HTML scrollv HTML var html:htmlloader = new HTMLLoader(); html.addeventlistener(event.html_bounds_change, scrollhtml); const SIZE:Number = 600; html.width = SIZE; html.height = SIZE; var urlreq:urlrequest = new URLRequest(" html.load(urlreq); this.addchild(html); function scrollhtml(event:event):void html.scrollv = html.contentheight - SIZE; HTMLLoader ActionScript HTMLLoader.createRootWindow() HTMLLoader 224 HTML

226 HTML 218 HTML HTMLLoader HTML window.history HTMLLoader HTML historylength historyposition gethistoryat() historyback() historyforward() historygo() URLRequest HistoryListItem HistoryListItem ispost originalurl title url HTML POST true HTML URL HTML HTML URL HTML HTMLLoader useragent HTMLLoader load() HTMLLoader useragent HTMLLoader load() URLRequest useragent URLRequestDefaults.userAgent HTMLLoader URLRequestDefaults URLRequest HTMLLoader load() URLRequest HTMLLoader useragent URLRequestDefaults.userAgent HTMLLoader useragent URLRequestDefaults.userAgent AIR Mac OS Windows "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) AdobeAIR/1.0" "Mozilla/5.0 (Windows; U; en) AppleWebKit/420+ (KHTML, like Gecko) AdobeAIR/1.0" HTML HTML meta meta http-equiv="content-type" content="text/html" charset="iso ";

227 HTML 219 HTMLLoader textencodingoverride var html:htmlloader = new HTMLLoader(); html.textencodingoverride = "ISO "; HTMLLoader textencodingfallback HTML HTMLLoader var html:htmlloader = new HTMLLoader(); html.textencodingfallback = "ISO "; textencodingoverride HTML textencodingoverride HTML textencodingfallback HTML textencodingoverride textencodingfallback HTML JavaScript API HTML AIR HTMLHost API HTMLHost HTMLLoader HTML window.moveto() HTMLLoader HTMLLoader AIR HTMLHost JavaScript window.status window.document.title window.location window.blur() window.close() window.focus() window.moveby() window.moveto() window.open() window.resizeby() window.resizeto() new HTMLLoader() HTMLLoader JavaScript HTMLHost JavaScript API HTMLHost HTMLHost HTMLHost defaultbehaviors true var defaulthost:htmlhost = new HTMLHost(true); AIR HTMLLoader createrootwindow() HTML HTMLHost HTMLLoader htmlhost HTMLHost null

228 HTML 220 AIR HTMLHost HTML AIR JavaScript window.open() HTMLHost HTMLHost HTMLLoader 1 AIR Flash CustomHostExample CustomHostExample.fla 2 CustomHost.as ActionScript HTMLHost CustomHost window.open() window.document.title window.open() HTML window.document.title HTML <title> package import flash.display.stagescalemode; import flash.display.nativewindow; import flash.display.nativewindowinitoptions; import flash.events.event; import flash.events.nativewindowboundsevent; import flash.geom.rectangle; import flash.html.htmlloader; import flash.html.htmlhost; import flash.html.htmlwindowcreateoptions; import flash.text.textfield; public class CustomHost extends HTMLHost public var statusfield:textfield; public function CustomHost(defaultBehaviors:Boolean=true) super(defaultbehaviors); override public function windowclose():void htmlloader.stage.nativewindow.close(); override public function createwindow( windowcreateoptions:htmlwindowcreateoptions ):HTMLLoader var initoptions:nativewindowinitoptions = new NativeWindowInitOptions(); var bounds:rectangle = new Rectangle(windowCreateOptions.x, windowcreateoptions.y, windowcreateoptions.width, windowcreateoptions.height); var htmlcontrol:htmlloader = HTMLLoader.createRootWindow(true, initoptions, windowcreateoptions.scrollbarsvisible, bounds); htmlcontrol.htmlhost = new HTMLHostImplementation(); if(windowcreateoptions.fullscreen) htmlcontrol.stage.displaystate = StageDisplayState.FULL_SCREEN_INTERACTIVE; return htmlcontrol; override public function updatelocation(locationurl:string):void trace(locationurl); override public function set windowrect(value:rectangle):void

229 HTML 221 htmlloader.stage.nativewindow.bounds = value; override public function updatestatus(status:string):void statusfield.text = status; trace(status); override public function updatetitle(title:string):void htmlloader.stage.nativewindow.title = title + "- Example Application"; override public function windowblur():void htmlloader.alpha = 0.5; override public function windowfocus():void htmlloader.alpha = 1; 3 CustomHostExample.as ActionScript HTMLLoader CustomHost package import flash.display.sprite; import flash.html.htmlloader; import flash.net.urlrequest; import flash.text.textfield; public class CustomHostExample extends Sprite function CustomHostExample():void var html:htmlloader = new HTMLLoader(); html.width = 550; html.height = 380; var host:customhost = new CustomHost(); html.htmlhost = host; var urlreq:urlrequest = new URLRequest("Test.html"); html.load(urlreq); addchild(html); var statustxt:textfield = new TextField(); statustxt.y = 380; statustxt.height = 20; statustxt.width = 550; statustxt.background = true; statustxt.backgroundcolor = 0xEEEEEEEE; addchild(statustxt); host.statusfield = statustxt; HTML

230 HTML 222 <html> <head> <title>test</title> <script> function openwindow() document.title = "Test" window.open('test.html'); </script> </head> <body bgcolor="#eeeeee"> <a href="#" onclick="window.open('test.html')">window.open('test.html')</a> <br/><a href="#" onclick="window.document.location=' window.document.location = ' <br/><a href="#" onclick="window.moveby(6, 12)">moveBy(6, 12)</a> <br/><a href="#" onclick="window.close()">window.close()</a> <br/><a href="#" onclick="window.blur()">window.blur()</a> <br/><a href="#" onclick="window.focus()">window.focus()</a> <br/><a href="#" onclick="window.status = new Date().toString()">window.status=new Date().toString()</a> </body> </html> window.location locationchange() HTML URL JavaScript window.location locationchange() URL override public function updatelocation(locationurl:string):void htmlloader.load(new URLRequest(locationURL)); HTMLHost htmlloader HTMLLoader window.moveby() window.moveto() window.resizeto() window.resizeby() JavaScript set windowrect() HTML JavaScript window.moveby() window.moveto() window.resizeto() window.resizeby() set windowrect() override public function set windowrect(value:rectangle):void htmlloader.stage.nativewindow.bounds = value; window.open() JavaScript createwindow() window.open() JavaScript createwindow() HTMLLoader HTMLLoader HTMLLoader.createRootWindow() HTMLLoader createwindow() NativeWindow HTMLLoader

231 HTML 223 override public function createwindow(windowcreateoptions:htmlwindowcreateoptions):htmlloader var initoptions:nativewindowinitoptions = new NativeWindowInitOptions(); var bounds:rectangle = new Rectangle(windowCreateOptions.x, windowcreateoptions.y, windowcreateoptions.width, windowcreateoptions.height); var htmlcontrol:htmlloader = HTMLLoader.createRootWindow(true, initoptions, windowcreateoptions.scrollbarsvisible, bounds); htmlcontrol.htmlhost = new HTMLHostImplementation(); if(windowcreateoptions.fullscreen) htmlcontrol.stage.displaystate = StageDisplayState.FULL_SCREEN_INTERACTIVE; return htmlcontrol; HTMLHost window.open() htmlhost null createwindow() HTMLWindowCreateOptions HTMLWindowCreateOptions window.open() features HTMLWindowCreateOptions fullscreen height locationbarvisible menubarvisible resizeable scrollbarsvisible statusbarvisible toolbarvisible width x y window.open() JavaScript features fullscreen height location menubar resizable scrollbars status toolbar width left screenx top screeny HTMLLoader feature JavaScript window.open() createwindow() HTMLLoader window.close() JavaScript windowclose() window.close() JavaScript window.close() override public function windowclose():void htmlloader.stage.nativewindow.close(); window.close() JavaScript HTMLLoader

232 HTML 224 override public function windowclose():void htmlloader.parent.removechild(htmlloader); window.status updatestatus() window.status JavaScript override public function updatestatus(status:string):void trace(status); updatestatus() HTMLLoader window.document.title updatetitle() window.document.title JavaScript Sample override public function updatetitle(title:string):void htmlloader.stage.nativewindow.title = title + " - Sample"; HTML document.title updatetitle() document.title HTMLLoader window.blur() window.focus() JavaScript windowblur() windowfocus() window.blur() window.focus() JavaScript override public function windowblur():void htmlloader.alpha = 0.5; override public function windowfocus():void htmlloader.alpha = 1.0; NativeApplication.nativeApplication.activate(htmlLoader.stage.nativeWindow); AIR API HTML HTMLLoader HTMLLoader.createRootWindow() HTMLLoader NativeWindow

233 HTML 225 visible windowinitoptions scrollbarsvisible bounds (true) (false) NativeWindowInitOptions NativeWindowInitOptions NativeWindow (true) (false) Rectangle HTMLLoader.createRootWindow() HTMLLoader var initoptions:nativewindowinitoptions = new NativeWindowInitOptions(); var bounds:rectangle = new Rectangle(10, 10, 600, 400); var html2:htmlloader = HTMLLoader.createRootWindow(true, initoptions, true, bounds); var urlreq2:urlrequest = new URLRequest(" html2.load(urlreq2); html2.stage.nativewindow.activate(); JavaScript createrootwindow() HTML JavaScript Window opener parent null HTMLHost createwindow() createrootwindow() opener parent HTML HTMLLoader HTMLLoader HTMLLoader HTML JavaScript window.open() HTMLHost HTMLHost HTMLLoader package import flash.html.htmlloader; public class MyHTMLHost extends HTMLHost public function MyHTMLHost() super(false); override public function createwindow(opts:htmlwindowcreateoptions):void var initoptions:nativewindowinitoptions = new NativeWindowInitOptions(); var bounds:rectangle = new Rectangle(opts.x, opts.y, opts.width, opts.height); var html:htmlloader = HTMLLoader.createRootWindow(true, initoptions, opts.scrollbarsvisible, bounds); html.stage.nativewindow.ordertofront(); return html HTMLLoader MyHTMLHost htmlhost

234 HTML 226 package import flash.html.htmlloader; import MyHTMLHost; import HTMLLoader; public class MyHTML extends HTMLLoader public function MyHTML() super(); htmlhost = new MyHTMLHost(); HTMLHost HTMLLoader.createRootWindow() 219 HTML

235 : PDF Adobe AIR SWF HTML PDF AIR HTMLLoader WebKit Adobe Reader PDF AIR PDF Adobe Reader PDF AIR Reader AIR PDF AIR PDF Adobe Reader Adobe Acrobat 8.1 PDF Adobe Reader Adobe Acrobat 8.1 AIR PDF PDF HTMLLoader.pdfCapability HTMLPDFCapability HTMLPDFCapability.STATUS_OK HTMLPDFCapability.ERROR_INSTALLED_READER_NOT_FO UND HTMLPDFCapability.ERROR_INSTALLED_READER_TOO_OL D HTMLPDFCapability.ERROR_PREFERRED_READER_TOO_OL D Adobe Reader 8.1 PDF HTMLLoader Adobe Reader HTMLLoader PDF Adobe Reader HTMLLoader PDF Adobe Reader 8.1 PDF Adobe Reader Reader 8.1 HTMLLoader PDF Windows Adobe Acrobat Adobe Reader 7.x PDF pdfcampability HTMLPDFCapability.STATUS_OK AIR PDF Acrobat Reader AIR Acrobat PDF Linux AIR PATH acroread /opt/adobe/reader Adobe Reader AIR PDF HTMLPDFCapability if(htmlloader.pdfcapability == HTMLPDFCapability.STATUS_OK) trace("pdf content can be displayed"); else trace("pdf cannot be displayed. Error code:", HTMLLoader.pdfCapability);

236 PDF 228 PDF HTMLLoader PDF PDF AIR PDF URLRequest PDF var request:urlrequest = new URLRequest(" pdf = new HTMLLoader(); pdf.height = 800; pdf.width = 600; pdf.load(request); container.addchild(pdf); URL AIR URL app app-storage PDFs test.pdf app:/js_api_reference.pdf AIR URL 254 URL AIR URL PDF JavaScript PDF Acrobat JavaScript Adobe Acrobat JavaScript Adobe Acrobat HTML-PDF HTML JavaScript PDF DOM postmessage() PDF JavaScript PDF <object id="pdfobj" data="test.pdf" type="application/pdf" width="100%" height="100%"/> HTML JavaScript PDF JavaScript pdfobject = document.getelementbyid("pdfobj"); pdfobject.postmessage(["testmsg", "hello"]); PDF JavaScript PDF JavaScript PDF PDF hostcontainer messagehandler messagehandler PDF PDF HTML

237 PDF 229 this.hostcontainer.messagehandler = onmessage: myonmessage; function myonmessage(amessage) if(amessage[0] == "testmsg") app.alert("test message: " + amessage[1]); else app.alert("error"); HTML JavaScript PDF postmessage() PDF JavaScript ("Hello from HTML") <html> <head> <title>pdf Test</title> <script> function init() pdfobject = document.getelementbyid("pdfobj"); try pdfobject.postmessage(["alert", "Hello from HTML"]); catch (e) alert( "Error: \n name = " + e.name + "\n message = " + e.message ); </script> </head> <body onload='init()'> <object id="pdfobj" data="test.pdf" type="application/pdf" width="100%" height="100%"/> </body> </html> Acrobat 8 PDF JavaScript Adobe AIR PDF ActionScript PDF ActionScript SWF PDF JavaScript ActionScript PDF HTMLLoader HTML JavaScript JavaScript PDF JavaScript 194 HTML JavaScript AIR PDF Adobe AIR PDF NativeWindow transparent true PDF

238 PDF 230 PDF AIR HTML PDF AIR Stage displaystate StageDisplayState.FULL_SCREEN StageDisplayState.FULL_SCREEN_INTERACTIVE PDF PDF HTMLLoader PDF filters alpha rotation scaling PDF HTMLLoader PDF NativeWindow scalemode StageScaleMode.NO_SCALE PDF PDF PDF PDF PDF PDF HTMLLoader AIR PDF

239 : Adobe Flash Media Rights Management Server (FMRMS) FLV MP4 FLV Adobe Media Player (DRM) API AIR FMRMS Internet DRM FMRMS FMRMS (SPI) AIR DRM DRM FMRMS FMRMS FMRMS Adobe Media Player Adobe Media Player Adobe Media Player AuthenticationMethod DRMAuthenticationCompleteEvent DRMAuthenticationErrorEvent DRMAuthenticateEvent DRMContentData DRMErrorEvent DRMManager DRMPlaybackTimeWindow DRMStatusEvent DRMVoucher LoadVoucherSetting NetStream

240 232 Adobe Flash Adobe AIR drm FLV AIR DRM StatusEvent DRMAuthenticateEvent DRMErrorEvent DRMStatusEvent DRM AIR DRM 1 NetStream FLV MP4 DRM.encryptedFLV events.statusevent FLV DRM 2 AIR NetStream DRMAuthenticateEvent 3 AIR DRMAuthenticationEvent usernameprompt passwordprompt urlprompt usernameprompt AIR DRMAuthenticateEvent DRMAuthenticateEvent DRM 4 setdrmauthenticationcredentials() NetStream NetStream AIR FMRMS NetStream DRMAuthenticateEvent 3 NetStream 5 DRM NetStream DRMStatusEvent AIR DRMStatusEvent detail DRM.voucherObtained AIR 1.5 DRMManager DRM DRMErrorEvent AIR DRMAuthenticationEvent NetStream setdrmauthenticationcredentials()

241 233 DRM Internet Internet NetStream preloadembeddedmetadata() AIR 1.5 DRMManager DRM 1 DRM 2 NetConnection NetStream NetStream ondrmcontentdata() onplaystatus() 3 NetStreamPlayOptions stream URL 4 NetStream preloadembeddedmetadata() NetStreamPlayOptions 5 DRM ondrmcontentdata() DRMContentData 6 DRMContentData DRMManager loadvoucher() DRMContentData authenticationmethod usernameandpassword DRMContentData serverurl domain DRMManager authenticate() 7 onplaystatus() ondrmcontentdata() DRM DRM package import flash.display.sprite; import flash.events.drmauthenticationcompleteevent; import flash.events.drmauthenticationerrorevent; import flash.events.drmerrorevent; import flash.ev ents.drmstatusevent; import flash.events.netstatusevent; import flash.net.netconnection; import flash.net.netstream; import flash.net.netstreamplayoptions; import flash.net.drm.authenticationmethod; import flash.net.drm.drmcontentdata; import flash.net.drm.drmmanager; import flash.net.drm.loadvouchersetting; public class DRMPreloader extends Sprite private var videourl:string = "app-storage:/video.flv"; private var username:string = "user"; private var password:string = "password"; private var preloadconnection:netconnection; private var preloadstream:netstream; private var drmmanager:drmmanager = DRMManager.getDRMManager(); private var drmcontentdata:drmcontentdata; public function DRMPreloader():void drmmanager.addeventlistener( DRMAuthenticationCompleteEvent.AUTHENTICATION_COMPLETE, onauthenticationcomplete ); drmmanager.addeventlistener( DRMAuthenticationErrorEvent.AUTHENTICATION_ERROR,onAuthenticationError ); drmmanager.addeventlistener(drmstatusevent.drm_status, ondrmstatus); drmmanager.addeventlistener(drmerrorevent.drm_error, ondrmerror); preloadconnection = new NetConnection(); preloadconnection.addeventlistener(netstatusevent.net_status, onconnect);

242 234 preloadconnection.connect(null); private function onconnect( event:netstatusevent ):void preloadmetadata(); private function preloadmetadata():void preloadstream = new NetStream( preloadconnection ); preloadstream.client = this; var options:netstreamplayoptions = new NetStreamPlayOptions(); options.streamname = videourl; preloadstream.preloadembeddeddata( options ); public function ondrmcontentdata( drmmetadata:drmcontentdata ):void drmcontentdata = drmmetadata; if ( drmmetadata.authenticationmethod == AuthenticationMethod.USERNAME_AND_PASSWORD ) authenticateuser(); else getvoucher(); private function getvoucher():void drmmanager.loadvoucher( drmcontentdata, LoadVoucherSetting.ALLOW_SERVER ); private function authenticateuser():void drmmanager.authenticate( drmcontentdata.serverurl, drmcontentdata.domain, username, password ); private function onauthenticationerror( event:drmauthenticationerrorevent ):void trace( "Authentication error: " + event.errorid + ", " + event.suberrorid ); private function onauthenticationcomplete( event:drmauthenticationcompleteevent ):void

243 235 trace( "Authenticated to: " + event.serverurl + ", domain: " + event.domain ); getvoucher(); private function ondrmstatus( event:drmstatusevent ):void trace( "DRM Status: " + event.detail); trace("--voucher allows offline playback = " + event.isavailableoffline ); trace("--voucher already cached = " + event.islocal ); trace("--voucher required authentication = " +!event.isanonymous ); private function ondrmerror( event:drmerrorevent ):void trace( "DRM error event: " + event.errorid + ", " + event.suberrorid + ", " + event.text ); public function onplaystatus( info:object ):void preloadstream.close(); NetStream DRM NetStream Flash Player AIR Flash Media Server NetStream NetStream NetConnection AIR NetStream DRM drmauthenticate DRMAuthenticateEvent NetStream (DRM) header usernameprompt passwordprompt urlprompt NetStream drmerror drmstatus status DRMErrorEvent NetStream (DRM) DRM DRM DRMStatusEvent (DRM) DRMStatusEvent events.statusevent NetStream.play() (DRM) status DRM.encryptedFLV NetStream DRM

244 236 resetdrmvouchers() (DRM) NetStream.resetDRMVouchers(); setdrmauthenticationcredentials() preloadembeddedmetadata() NetStream "drm" "proxy" "drm" FMRMS "proxy" Internet proxy FMRMS "drm" setdrmauthenticationcredentials() FMRMS DRM AIR ondrmcontentdata() preloadembeddedmetadata() NetStream ondrmcontentdata() onplaystatus() DRM ondrmcontentdata() onplaystatus() NetStream client ondrmcontentdata() onplaystatus() NetStream preloadembeddedmetadata() onplaystatus() administrator password drm setdrmauthenticationcredentials() var connection:netconnection = new NetConnection(); connection.connect(null); var videostream:netstream = new NetStream(connection); videostream.addeventlistener(drmauthenticateevent.drm_authenticate, drmauthenticateeventhandler) private function drmauthenticateeventhandler(event:drmauthenticateevent):void videostream.setdrmauthenticationcredentials("administrator", "password", "drm"); DRMStatusEvent (DRM) NetStream DRMStatusEvent DRMStatusEvent DRMStatusEvent DRMStatusEvent DRMStatusEvent

245 237 contentdata detail isanonymous isavailableoffline islocal offlineleaseperiod policies voucherenddate DRM DRMContentData DRM 1.0 DRM.voucherObtained DRM true false false DRM true false DRM DRMVoucher DRMStatusEvent NetStream DRM DRM NetStream function drmstatuseventhandler(event:drmstatusevent):void trace(event); function drmstatuseventhandler(event:drmstatusevent):void trace(event); DRMAuthenticateEvent DRMAuthenticateEvent NetStream (DRM) DRMAuthenticateEvent NetStream.setDRMAuthenticationCredentials() AIR AIR DRMAuthenticateEvent DRMAuthenticateEvent

246 238 authenticationtype header netstream passwordprompt urlprompt usernameprompt FMRMS drm proxy Internet proxy FMRMS drm setdrmauthenticationcredentials() FMRMS NetStream URL DRMAuthenticateEvent NetStream var connection:netconnection = new NetConnection(); connection.connect(null); var videostream:netstream = new NetStream(connection); videostream.addeventlistener(drmauthenticateevent.drm_authenticate, drmauthenticateeventhandler) private function drmauthenticateeventhandler(event:drmauthenticateevent):void videostream.setdrmauthenticationcredentials("administrator", "password", "drm"); DRM AIR DRMErrorEvent NetStream (DRM) DRM AIR DRMErrorEvent DRMAuthenticateEvent AIR DRM DRM DRM DRMErrorEvent DRMErrorEvent DRMErrorEvent

247 Flash Media Rights Management Server (FMRMS) (SSL) Server URL 1006 Flash Media Rights Management Server (FMRMS) (DRM) FLV 1010 publisherid:applicationid ID ID FLV ID 3300 Adobe Policy Server Flash Media Rights Management Server (FMRMS) (SSL) Server URL 3306 Flash Media Rights Management Server (FMRMS) Flash

248 240 ID 3310 publisherid:applicationid ID ID 3311 min=x:max=y Microsafe 3314 FLV 3315 DRM 3316 AdobeCP 3317 AdobeCP 3318 AdobeCP 3319 AdobeCP API 3320 AdobeCP DRMErrorEvent NetStream NetStream DRM private function drmerroreventhandler(event:drmerrorevent):void trace(event.tostring()); DRMManager AIR DRMManager AIR 1.5 DRMManager DRM AIR DRMManager NetStream preloadembeddedmetadata() NetStream preloadembeddedmetadata() DRMContentData DRMContentData URL DRMManager loadvoucher() 233 DRMManager

249 241 DRMManager authenticate() DRMManager DRMAuthenticationCompleteEvent setauthenticationtoken() AIR AIR AIR 179 DRMStatus loadvoucher() DRMManager DRMStatusEvent detail DRM.voucherObtained voucher DRMVoucher detail DRM.voucherObtained voucher null localonly LoadVoucherSetting loadvoucher() DRMManager DRMErrorEvent DRMAuthenticationComplete authenticate() DRMManager DRMAuthenticationCompleteEvent AIR 1.5 DRMAuthenticationCompleteEvent DRMManager setauthenticationtoken() AIR API DRMAuthenticationError authenticate() setauthenticationtoken() DRMManager DRMAuthenticationErrorEvent DRMContentData DRMContentData DRM metadata DRMContentData

250 : Adobe AIR AIR (Mac OS X) AIR AIR <customupdateui>true</customupdateui> com.adobe.air.air launchapplication() AIR Flash <allowbrowserinvocation>true</allowbrowserinvocation> 265 AIR AIR AIR NativeApplication invoke InvokeEvent invoke NativeApplication invoke 265 AIR invoke NativeApplication (NativeApplication.nativeApplication) addeventlistener() invoke invoke addeventlistener() invoke invoke invoke invoke AIR AIR invoke AIR invoke InvokeEvent AIR Mac OS X InvokeEvent arguments Windows Linux InvokeEvent invoke NativeApplication NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, oninvokeevent); air.nativeapplication.nativeapplication.addeventlistener(air.invokeevent.invoke, oninvokeevent);

251 243 var arguments:array; var currentdir:file; public function oninvokeevent(invocation:invokeevent):void arguments = invocation.arguments; currentdir = invocation.currentdirectory; AIR NativeApplication invoke InvokeEvent.arguments AIR currentdirectory AIR tick tock tick "tick tock" "tick" tock \"tick\" \"tock\" tick,tock tick,tick tock tick,tock "tick","tock" InvokeEvent.currentDirectory File AIR AIR ID AIR currentdirectory File resolve() if((invokeevent.currentdirectory!= null)&&(invokeevent.arguments.length > 0)) dir = invokeevent.currentdirectory; filetoopen = dir.resolvepath(invokeevent.arguments[0]); invoke Adobe Flash CS3 Professional Adobe Flash CS4 Professional Flash (Adobe AIR) ActionScript 3.0 >... > InvokeEventLogExample InvokeEventLogExample.fla FLA ActionScript ActionScript InvokeEventLogExample.as

252 244 package import flash.display.sprite; import flash.events.invokeevent; import flash.desktop.nativeapplication; import flash.text.textfield; public class InvokeEventLogExample extends Sprite public var log:textfield; public function InvokeEventLogExample() log = new TextField(); log.x = 15; log.y = 15; log.width = 520; log.height = 370; log.background = true; addchild(log); NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, oninvoke); public function oninvoke(invokeevent:invokeevent):void var now:string = new Date().toTimeString(); logevent("invoke event received: " + now); if (invokeevent.currentdirectory!= null) logevent("current directory=" + invokeevent.currentdirectory.nativepath); else logevent("--no directory information available--"); if (invokeevent.arguments.length > 0) logevent("arguments: " + invokeevent.arguments.tostring()); else logevent("--no arguments--"); public function logevent(entry:string):void log.appendtext(entry + "\n"); trace(entry);

253 245 NativeApplication.nativeApplication.startAtLogin=true AIR false startatlogin true ADL AIR allowbrowserinvocation true <allowbrowserinvocation>true</allowbrowserinvocation> 37 AIR NativeApplication BrowserInvokeEvent BrowserInvokeEvent AIR NativeApplication (NativeApplication.nativeApplication) addeventlistener() BrowserInvokeEvent BrowserInvokeEvent addeventlistener() BrowserInvokeEvent BrowserInvokeEvent BrowserInvokeEvent BrowserInvokeEvent arguments ishttps isuserevent sandboxtype https URL (true (false) AIR 1.0 true AIR Security.sandboxType Security.APPLICATION Security.LOCAL_TRUSTED Security.LOCAL_WITH_FILE Security.LOCAL_WITH_NETWORK Security.REMOTE securitydomain " "

254 246 AIR BrowserInvokeEvent arguments API BrowserInvokeEvent securitydomain HTTPS BrowserInvokeEvent ishttps URL URL BrowserInvokeEvent File file:// 265 AIR NativeApplication.nativeApplication.exit() exit() exit() NativeApplication.nativeApplication.autoExit true Mac OS Windows Linux NativeApplication exiting exiting closing close closing NativeApplication exiting Windows exiting NativeApplication autoexit true 1 NativeApplication exiting exit() public function applicationexit():void var exitingevent:event = new Event(Event.EXITING, false, true); NativeApplication.nativeApplication.dispatchEvent(exitingEvent); if (!exitingevent.isdefaultprevented()) NativeApplication.nativeApplication.exit(); 2 NativeApplication.nativeApplication exiting closing

255 247 NativeApplication.nativeApplication.openedWindows private function onexiting(exitingevent:event):void var winclosingevent:event; for each (var win:nativewindow in NativeApplication.nativeApplication.openedWindows) winclosingevent = new Event(Event.CLOSING,false,true); win.dispatchevent(winclosingevent); if (!winclosingevent.isdefaultprevented()) win.close(); else exitingevent.preventdefault(); if (!exitingevent.isdefaultprevented()) //perform cleanup 3 Windows closing 4 exiting exiting 37 AIR 273

256 : ID NativeApplication applicationdescriptor publisherid NativeApplication applicationdescriptor XML var appxml:xml = NativeApplication.nativeApplication.applicationDescriptor; XML (E4X) var appxml:xml = NativeApplication.nativeApplication.applicationDescriptor; var ns:namespace = appxml.namespace(); var appid = appxml.ns::id[0]; var appversion = appxml.ns::version[0]; var appname = appxml.ns::filename[0]; air.trace("appid:", appid); air.trace("version:", appversion); air.trace("filename:", appname); var xmlstring = air.nativeapplication.nativeapplication.applicationdescriptor; 37 ID ID AIR <id> ID ID AIR NativeApplication id ID trace(nativeapplication.nativeapplication.applicationid); NativeApplication publisherid ID trace(nativeapplication.nativeapplication.publisherid); ADL AIR ADL -pubid ID ID META-INF/AIR/publisherid ID 267 AIR

257 : AIR Adobe AIR AIR AIR AIR NativeApplication.setAsDefaultApplication() AIR NativeApplication issetasdefaultapplication() setasdefaultapplication() removeasdefaultapplication() getdefaultapplication() AIR true AIR AIR AIR 43 NativeApplication runtimeversion "1.0.5" NativeApplication runtimepatchlevel 2960 trace(nativeapplication.nativeapplication.runtimeversion); trace(nativeapplication.nativeapplication.runtimepatchlevel); AIR Adobe AIR Security.sandboxType Security.APPLICATION Adobe AIR AIR API

258 250 if (Security.sandboxType == Security.APPLICATION) // Load SWF that contains AIR APIs else // Load SWF that does not contain AIR APIs AIR Adobe Flash Player Web Capabilities.playerType "Desktop" Flash Player 21 AIR NativeApplication NativeApplication.idleThreshold NativeApplication useridle NativeApplication userpresent idlethreshold NativeApplication.nativeApplication.lastUserInput 2 useridle userpresent NativeApplication.nativeApplication.idleThreshold = 120; NativeApplication.nativeApplication.addEventListener(Event.USER_IDLE, function(event:event) trace("idle"); ); NativeApplication.nativeApplication.addEventListener(Event.USER_PRESENT, function(event:event) trace("present"); ); userpresent useridle

259 : Adobe AIR AIR AIR Adobe AIR NativeApplication NativeApplication.nativeApplication.addEventListener(Event.NETWORK_CHANGE, onnetworkchange); function onnetworkchange(event:event) //Check resource availability Event.NETWORK_CHANGE AIR VPN air.net AIR Web Web AIR servicemonitor.swc servicemonitor.swc Adobe Flash CS3 Professional ServiceMonitorShim import ActionScript 3.0 import air.net.*; Adobe Flash CS4 Professional 1 > 2 ActionScript SWC Adobe Flash CS4/AIK1.1/frameworks/libs/air/servicemoniter.swc 4 5 import ActionScript 3.0 import air.net.*;

260 252 ServiceMonitor ServiceMonitor Adobe AIR ServiceMonitor ServiceMonitor pollinterval start() ServiceMonitor URLMonitor ServiceMonitor URLRequest HTTP SocketMonitor ServiceMonitor HTTP URLMonitor 80 HTTP HTTP URLMonitor Adobe import air.net.urlmonitor; import flash.net.urlrequest; import flash.events.statusevent; var monitor:urlmonitor; monitor = new URLMonitor(new URLRequest(' monitor.addeventlistener(statusevent.status, announcestatus); monitor.start(); function announcestatus(e:statusevent):void trace("status change. Current status: " + monitor.available); AIR URLMonitor SocketMonitor 6667 IRC import air.net.servicemonitor; import flash.events.statusevent; socketmonitor = new SocketMonitor(' socketmonitor.addeventlistener(statusevent.status, socketstatuschange); socketmonitor.start(); function announcestatus(e:statusevent):void trace("status change. Current status: " + socketmonitor.available);

261 : URL URL Adobe AIR SWF URLRequest API AIR Adobe ActionScript 3.0 Adobe ActionScript 3.0 URLRequest URLRequest URL AIR URLRequest AIR URL file http URL URLRequest URLRequest AIR followredirects managecookies authenticate cacheresponse usecache useragent true false HTTP cookie true false true 254 URLRequest (true) URLRequest (true) HTTP URLRequest AIR contenttype data digest method requestheaders url URL MIME URL Adobe Flash Player HTTP GET POST AIR "GET" "POST" method HTTP "GET" 21 AIR HTTP HTTP URL HTMLLoader HTMLLoader 194 HTMLLoader

262 URL 254 URLRequest URLRequestDefaults URLRequest managecookies usecache URLRequestDefaults.manageCookies = false; URLRequestDefaults.useCache = false; air.urlrequestdefaults.managecookies = false; air.urlrequestdefaults.usecache = false; URLRequestDefaults setlogincredentialsforhost() hostname " " "example.com" " "sales.example.com" setlogincredentialsforhost() URLRequestDefaults.setLoginCredentialsForHost(" "Ada", "love1816$x"); air.urlrequestdefaults.setlogincredentialsforhost(" "Ada", "love1816$x"); URLRequestDefaults setlogincredentialsforhost() AIR ActionScript 3.0 ( URLRequestDefaults URL AIR URL AIR URL URL http: https: Web file: file:///c:/air Test/test.txt URL app: resources app:/resources ADL app-storage: AIR settings prefs.xml app-storage:/settings/prefs.xml

263 URL 255 ID ID Mac OS /Users/user name/library/preferences/applicationid.publisherid/local Store/ /Users/babbage/Library/Preferences/com.example.TestApp.02D88EEED35F84C264A EEA353A629FD.1/Loca l Store Windows Documents and Settings user name/application Data/applicationID.publisherID/Local Store/ C:\Documents and Settings\babbage\Application Data\com.example.TestApp.02D88EEED35F84C264A EEA353A629FD.1\Local Store Linux /home/user name/.appdata/applicationid publisherid/local Store/ /home/babbage/.appdata/com.example.testapp.02d88eeed35f84c264a eea353a629fd.1\local Store File.applicationStorageDirectory File URL url app-storage URL var dir:file = File.applicationStorageDirectory; dir = dir.resolvepath("preferences"); trace(dir.url); // app-storage:/preferences var dir = air.file.applicationstoragedirectory; dir = dir.resolvepath("prefs.xml"); air.trace(dir.url); // app-storage:/preferences mailto: navigatetourl() URLRequest mailto 256 Web URL AIR URL URL URLRequest FileStream Sound URL AIR HTML img src AIR URL app: app-storage: 21 AIR URL API Web AIR API URL API 256 Web URL

264 URL 256 URLStream URLStream URL URLStream httpresponsestatus httpstatus httpresponsestatus httpresponsestatus HTTPStatusEvent responseurl URL responseheaders URLRequestHeader Web URL navigatetourl() Web URL request URLRequest url var url = " var urlreq = new air.urlrequest(url); air.navigatetourl(urlreq); navigatetourl() POST URLRequest method URLRequestMethod.POST GET navigatetourl() navigatetourl() URL API Web AIR API URL API 21 AIR Web http: https: file: mailto: AIR app: app-storage: URL Web http: https: mailto: AIR URL Web file: mailto: AIR

265 URL 257 URL Web http: https: mailto: AIR URL Web file: http: https: mailto: AIR URL

266 : LocalConnection Adobe AIR AIR SWF LocalConnection connect() connectionname AIR AIR AIR app# ID (.) AIR ID SWF ID com.example.air.myapp connectionname ID B146A943FBD637B68C334022D304CEA226D129B4 connectionname "app#com.example.air.myapp.b146a943fbd637b68c334022d304cea226d129b4:connectionname" 248 AIR LocalConnection allowdomain() AIR ID ID AIR ID com.example.air.friendlyapp ID BD677B62C33D EA236D13934 app#com.example.air.friendlyapp bd677b62c33d ea236d13934 ADL Flash CS3 Flex Builder Dreamweaver ID null ID ID ADL ID ID

267 : AIR AIR AIR CD-ROM AIR AIR Adobe AIR AIR AIR (ADT) AIR Flash AIR AIR 15 AIR Adobe AIR SDK AIR 295 AIR Developer Tool (ADT) AIR 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 272 AIR AIR Windows Linux Mac OS /Applications

268 AIR 260 AIR AIR AIR AIR AIR SWF AIR AIR AIR AIR SDK badge.swf 260 badge.swf AIR Web AIR ( badge.swf SDK badge.swf SWF SWF AIR 264 AIR AIR 264 AIR 263 AIR 265 AIR adobe.com SWF air.swf API badge.swf SWF air.swf API SWF LocalConnection AIR 258 air.swf API Windows Mac OS Web Adobe Flash Player 9 3 Linux Flash Player Flash Player Flash Player Flash Player AIR badge.swf air.swf API badge.swf AIR AIR SDK badge.swf badge.swf AIR badge.swf Adobe badge.swf badge.swf badge.swf 1 AIR SDK samples/badge Web badge.swf default_badge.html AC_RunActiveContent.js 2 default_badge.html

269 AIR default_badge.html AC_FL_RunContent() JavaScript FlashVars appname appurl airversion imageurl buttoncolor messagecolor SWF AIR URL URL URL FFCC00 FFCC00 4 badge.swf 217 x 180 AC_FL_RunContent() width height 5 default_badge.html HTML badge.swf 262 badge.swf AIR SWF AIR 1 Flash Player Windows Mac OS 9 3 Linux 10 Web HTML 2 badge.swf 1 Adobe AIR 3 Windows AIR c:\program Files\ / Mac Applications Mac /Applications Linux AIR /opt 4 5

270 AIR 262 badge.swf AIR SDK badge.swf SDK samples/badge badge.fla AIRBadge.as badge.swf Flash badge.fla SWF 9 Flash Player basdge.fla ActionScript 3.0 Flash CS3 Flash CS4 badge.fla AIRBadge() AIRBadge 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() installapplication() AIR url - URL URL runtimeversion - "1.0.M6" arguments - allowbrowserinvocation true 37 AIR NativeApplication BrowserInvokeEvent 265 AIR url runtimeversion HTML FlashVars SWF

271 AIR 263 LocalConnection badge.swf 258 air.swf getapplicationversion() 264 AIR air.swf SWF air.swf API AIR 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(" loadercontext); function oninit(e:event):void airswf = e.target.content; air.swf Loader contentloaderinfo init air.swf API API AIR 264 AIR 265 AIR AIR SDK badge.swf air.swf 260 badge.swf AIR air.swf SWF SWF air.swf getstatus() 263 air.swf air.swf SWF air.swf getstatus() var status:string = airswf.getstatus(); getstatus() "available" "unavailable" "installed"

272 AIR 264 Flash Player Windows Mac OS 9 3 Linux 10 getstatus() AIR SWF air.swf getapplicationversion() AIR ID ID 263 air.swf air.swf SWF air.swf getapplicationversion() var appid:string = "com.example.air.mytestapplication"; var pubid:string = "02D88EEED35F84C264A EEA353A629FD.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 pubid callback ID 39 ID 267 AIR getapplicationversion() null Flash Player Windows Mac OS 9 3 Linux 10 getapplicationversion() AIR SWF air.swf installapplication() AIR 263 air.swf air.swf SWF air.swf installapplication() var url:string = " var runtimeversion:string = "1.0"; var arguments:array = ["launchfrombrowser"]; // Optional airswf.installapplication(url, runtimeversion, arguments); installapplication()

273 AIR 265 url runtimeversion arguments AIR URL URL 1.0 allowbrowserinvocation true 37 AIR NativeApplication BrowserInvokeEvent 265 AIR installapplication() Flash Player Windows Mac OS 9 3 Linux 10 installapplication() Mac Windows air.swf getapplicationversion() 264 AIR LocalConnection SWF 258 AIR <allowbrowserinvocation>true</allowbrowserinvocation> 37 AIR SWF air.swf launchapplication() AIR 263 air.swf air.swf SWF air.swf launchapplication() var appid:string = "com.example.air.mytestapplication"; var pubid:string = "02D88EEED35F84C264A EEA353A629FD.1"; var arguments:array = ["launchfrombrowser"]; // Optional airswf.launchapplication(appid, pubid, arguments); launchapplication() air.swf SWF AIR allowbrowserinvocation appid pubid arguments ID 39 ID 267 AIR NativeApplication arguments BrowserInvokeEvent launchapplication()

274 AIR 266 Flash Player Windows Mac OS 9 3 Linux 10 launchapplication() allowbrowserinvocation false launchapplication() air.swf getapplicationversion() 264 AIR NativeApplication BrowserInvokeEvent LocalConnection SWF 258 IT Adobe AIR AIR IT Microsoft SMS IBM Tivoli Adobe AIR AIR AIR ( AIR (CA) AIR AIR AIR keystore AIR (CPS) AIR ChosenSecurity ( ( GlobalSign ( GlobalSign CPS ( Thawte CPS ( Thawte Code Signing Developer's Agreement ( VeriSign CPS ( VeriSign Subscriber's Agreement (

275 AIR 267 AIR AIR AIR AIR (PKI) AIR AIR AIR AIR AIR AIR AIR AIR AIR AIR (ADT) ID AIR AIR ID ID LocalConnection AIR 258 NativeApplication.nativeApplication.publisherID ID ID Name CommonName Surname GivenName Initials GenerationQualifier DNQualifier CountryName localityname StateOrProvinceName OrganizationName OrganizationalUnitName Title SerialNumber DomainComponent Pseudonym BusinessCategory StreetAddress PostalCode PostalAddress DateOfBirth PlaceOfBirth Gender CountryOfCitizenship CountryOfResidence NameAtBirth ID CA AIR Java (JCA) Keystore Keystore PKCS12.pfx.p12 Java.keystore PKCS11 Keystore Keystore ADT 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

276 AIR 268 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 Air Air (ADT) AIR 295 AIR Developer Tool (ADT) AIR Flex Builder Dreamweaver Flash AIR AIR Thawte AIR ADT Thawte AIR AIR Thawte Mozilla Firefox Keystore Firefox Keystore Keystore / Firefox Keystore Thawte 1 Thawte Product page for Code Signing Certificates 2 Code Signing Certificates Adobe AIR Developer Certificate 3 Thawte Thawte 4 Thawte Firefox Keystore 5 Firefox Keystore Keystore

277 AIR 269 Firefox / ADT Flex Flash Dreamweaver.p12 (pfx) a b c d e f g h Firefox (Certificate Manager) Windows (Tools) -> (Options) -> (Advanced) -> (Encryption) -> (View Certificates) Mac OS Firefox -> (Preferences) -> (Advanced) -> (Encryption) -> (View Certificates) Linux (Edit) -> (Preferences) -> (Advanced) -> (Encryption) -> (View Certificates) Adobe AIR (Adobe AIR Code Signing Certificate) (Backup) Keystore (Save) Firefox Firefox (Choose a Certificate Backup Password) Keystore Keystore AIR i Keystore.p12 PKCS12 6 ADT Flex Builder Flash Dreamweaver Keystore AIR Firefox Keystore AIR AIR AIR AIR AIR AIR AIR AIR AIR 1.1 AIR 1 2 AIR 3 AIR ADT -migrate 302 AIR

278 AIR 270 AIR ID ID ID AIR AIR ID (ELS) ELS AIR AIR AIR AIR AIR 267 AIR (CA) (CPS) (CRL) Keystore Java (JCA) PKCS #11 PKCS #12 CA CPS CA AIR AIR CRL CA - PKI Keystore Java Cryptography Architecture Reference Guide RSA Laboratories Keystore RSA Laboratories Keystore -

279 AIR 271 (PKI) - CA ADT RFC 3161 AIR AIR AIR AIR RFC 3161

280 : AIR AIR AIR Adobe AIR 259 AIR Updater Updater update() AIR AIR ID ID ID AIR 1.1 AIR AIR AIR 1.5 Adobe AIR API AIR 269 Updater flash.desktop update() AIR Sample_App_v2.air var updater:updater = new Updater(); var airfile:file = File.desktopDirectory.resolvePath("Sample_App_v2.air"); var version:string = "2.01"; updater.update(airfile, version); Updater AIR 274 AIR Updater.update() update() AIR AIR ID ID update() ID ID ID ID 37 AIR update() version Mac OS Windows Linux ADL update()

281 AIR 273 update() version AIR application version version AIR AIR 2.01 version 2 Adobe AIR Web AIR Web AIR update() version AIR AIR AIR AIR AIR ZIP 37 AIR AIR customupdateui <customupdateui>true</customupdateui> ID ID AIR AIR 43 NativeApplication.nativeApplication load Updater

使用 Adobe® Extension Manager CS4

使用 Adobe® Extension Manager CS4 ADOBE EXTENSION MANAGER CS4 2008 Adobe Systems Incorporated. Windows Mac OS Adobe Extension Manager 2.0 Adobe Systems Incorporated : Adobe Systems Incorporated Adobe Systems Incorporated Adobe, the Adobe

More information

使用 Adobe® Extension Manager CS4

使用 Adobe® Extension Manager CS4 ADOBE EXTENSION MANAGER CS4 2008 Adobe Systems Incorporated Windows Mac OS Adobe Extension Manager 2.0 Adobe Systems Incorporated Adobe Systems Incorporated Adobe Systems Incorporated Adobe, the Adobe

More information

Adobe AIR 安全性

Adobe AIR 安全性 ADOBE AIR http://help.adobe.com/zh_cn/legalnotices/index.html iii............................................................................................ 1............................................................................................

More information

Adobe® InDesign® CS5 篩選器讀我檔案

Adobe® InDesign® CS5 篩選器讀我檔案 ADOBE INDESIGN CS5 2010/5/21 2010 Adobe Systems Incorporated and its licensors. All rights reserved. Adobe InDesign CS5 - Windows Mac OS This user guide is protected under copyright law, furnished for

More information

DATE 和 DATETIME 資 料 行 相 似 性 與 AIR 測 試 版 不 相 容...8 資 料 行 相 似 性 的 行 為 方 式 與 AIR 測 試 版 不 相 容...9 在 Mac OS 全 螢 幕 模 式 下, 重 疊 視 窗 未 能 隱 藏 停 駐 列 及 選 單 列...9

DATE 和 DATETIME 資 料 行 相 似 性 與 AIR 測 試 版 不 相 容...8 資 料 行 相 似 性 的 行 為 方 式 與 AIR 測 試 版 不 相 容...9 在 Mac OS 全 螢 幕 模 式 下, 重 疊 視 窗 未 能 隱 藏 停 駐 列 及 選 單 列...9 Adobe AIR 1.1 版 本 說 明 6/16/2008 目 錄 Adobe AIR 1.1 的 系 統 需 求... 2 AIR 1.1 特 色... 3 應 用 程 式 描 述 器 變 更...3 AIR 1.1 的 API 新 增 項 目...4 憑 證 移 轉...6 安 裝 Adobe AIR... 6 AIR 1.1 執 行 階 段 與 AIR 應 用 程 式 安 裝...6 整

More information

1. 2. Flex Adobe 3.

1. 2. Flex Adobe 3. 1. 2. Flex Adobe 3. Flex Adobe Flex Flex Web Flex Flex Flex Adobe Flash Player 9 /rich Internet applications/ria Flex 1. 2. 3. 4. 5. 6. SWF Flash Player Flex 1. Flex framework Adobe Flex 2 framework RIA

More information

使用 Adobe® Bridge 和 Adobe® Version Cue CS4

使用 Adobe® Bridge 和 Adobe® Version Cue CS4 ADOBE BRIDGE ADOBE VERSION CUE CS4 2008 Adobe Systems Incorporated Adobe Bridge CS4 Adobe Version Cue CS4 - Windows Mac OS Adobe Systems Incorporated Adobe Systems Incorporated Adobe Systems Incorporated

More information

发行说明, 7.0.1 版

发行说明, 7.0.1 版 发 行 说 明 Websense Web Security Websense Web Filter 7.0.1 版 本 版 本 的 新 特 点 Websense Web Security 和 Websense Web Filter 的 7.0.1 版 本 均 已 本 地 化 为 以 下 语 言 : 法 语 德 语 意 大 利 语 日 语 葡 萄 牙 语 简 体 中 文 西 班 牙 语 繁 体 中 文

More information

使用 Adobe® Bridge 和 Adobe® Version Cue CS4

使用 Adobe® Bridge 和 Adobe® Version Cue CS4 ADOBE BRIDGE ADOBE VERSION CUE CS4 2008 Adobe Systems Incorporated Adobe Bridge CS4 Adobe Version Cue CS4 Windows Mac OS Adobe Systems Incorporated Adobe Systems Incorporated Adobe Systems Incorporated

More information

产品手册

产品手册 Norton 360TM 产 品 手 册 关 爱 环 境, 我 们 应 尽 的 责 任 Symantec 已 移 除 本 手 册 的 封 面, 以 降 低 对 环 境 的 影 响 Norton 360 产 品 手 册 本 手 册 介 绍 的 软 件 基 于 授 权 许 可 协 议 提 供, 且 只 能 在 遵 守 协 议 条 款 的 前 提 下 使 用 文 档 版 本 21.0 Copyright

More information

加 快 审 阅 和 标 记 工 作 流 程 Acrobat X 通 过 提 供 一 种 可 靠 的 文 件 格 式 扩 展 了 Office 和 SharePoint 的 协 作 服 务, 可 以 使 用 大 多 数 桌 面 应 用 程 序 生 成 这 种 格 式 并 使 用 Acrobat 或 免

加 快 审 阅 和 标 记 工 作 流 程 Acrobat X 通 过 提 供 一 种 可 靠 的 文 件 格 式 扩 展 了 Office 和 SharePoint 的 协 作 服 务, 可 以 使 用 大 多 数 桌 面 应 用 程 序 生 成 这 种 格 式 并 使 用 Acrobat 或 免 使 用 Adobe Acrobat X 增 强 与 Microsoft SharePoint 及 Microsoft Office 的 协 作 通 过 将 基 于 PDF 的 工 作 流 程 集 成 到 SharePoint 和 Office 平 台 缩 短 项 目 审 阅 周 期 目 录 1: 内 容 概 要 1: 协 作 难 题 2: 加 快 审 阅 和 标 记 工 作 流 程 3: Adobe

More information

Adobe® Flash® 的 Adobe® ActionScript® 3.0 程式設計

Adobe® Flash® 的 Adobe® ActionScript® 3.0 程式設計 337 18 Adobe Flash CS4 Professional MovieClip ActionScript Flash ActionScript Flash Flash Flash MovieClip MovieClip ActionScript ( ) MovieClip Flash Sprite ActionScript MovieClip ActionScript 3.0 Shape

More information

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南 Symantec Sygate Enterprise Protection 防 护 代 理 安 装 使 用 指 南 5.1 版 版 权 信 息 Copyright 2005 Symantec Corporation. 2005 年 Symantec Corporation 版 权 所 有 All rights reserved. 保 留 所 有 权 利 Symantec Symantec 徽 标 Sygate

More information

Panaboard Overlayer help

Panaboard Overlayer help Panaboard Overlayer Image Capture Software for Electronic Whiteboard (Panaboard) ... 3... 5... 6... 13...14 Panaboard Overlayer 1. 2. 3. 4. 4-1. 4-2. [ / ] ( ) 4-3. 5. 6. 6-1. 6-2. [ / ] ( ) 7. Panaboard

More information

面向学生的帮助

面向学生的帮助 Blackboard Learn 9.1 - - 1 2012 Blackboard Inc. 6,988,138 Blackboard Learn 9.1 Service Pack 8 (SP 8) Blackboard Inc. 650 Massachusetts Avenue NW Sixth Floor Washington, DC 20001-3796 USA +1 800 424 9299

More information

1. Revo Uninstaller Pro Revo Uninstaller Pro Revo Uninstaller Pro Revo Uninstaller Pro Revo Uninsta ller Pro Revo Uninstaller Pro Revo Uninstaller Pro

1. Revo Uninstaller Pro Revo Uninstaller Pro Revo Uninstaller Pro Revo Uninstaller Pro Revo Uninsta ller Pro Revo Uninstaller Pro Revo Uninstaller Pro 1. 2. 3. 3.1. 3.2. 3.2.1. 3.2.2. 3.2.3. 3.3. 3.4. 3.5. 4. 5. 5.1. 5.2. 5.3. Windows 5.4. 5.5. 5.6. 5.7. 5.8. 6. 6.1. 6.2. 6.2.1. 6.2.2. 6.3. 6.3.1. 6.3.2. 6.4. 6.4.1. 6.4.2. 6.4.3. 6.5. 6.6. 7. 8. 9. Revo

More information

chapter 2 HTML5 目錄iii HTML HTML HTML HTML HTML canvas

chapter 2 HTML5 目錄iii HTML HTML HTML HTML HTML canvas Contents 目錄 chapter 1 1-1... 1-2 1-2... 1-3 HTML5... 1-3... 1-5 1-3... 1-9 Web Storage... 1-9... 1-10 1-4 HTML5... 1-14... 1-14... 1-15 HTML5... 1-15... 1-15... 1-16 1-5... 1-18 Apps... 1-18 HTML5 Cache

More information

快速参考指南

快速参考指南 PDF Reader 6 快 速 参 考 指 南 Nuance PDF Reader 6 参 考 指 南 1 介 绍 欢 迎 使 用 Nuance PDF Reader 6! 您 可 以 使 用 本 产 品 查 看 和 处 理 PDF 文 件 其 主 要 功 能 包 括 : 缩 放 和 旋 转 页 面 使 用 书 签 在 文 档 中 导 航 跳 转 到 定 义 的 页 面 查 看 当 前 文 件 夹

More information

目 录 版 权 所 有 2008 QSR International Pty Ltd. ABN 47 006 357 213. 保 留 所 有 权 利 NVivo 和 QSR 文 字 及 徽 标 是 QSR International Pty Ltd. 的 商 标 或 注 册 商 标 专 利 申 请

目 录 版 权 所 有 2008 QSR International Pty Ltd. ABN 47 006 357 213. 保 留 所 有 权 利 NVivo 和 QSR 文 字 及 徽 标 是 QSR International Pty Ltd. 的 商 标 或 注 册 商 标 专 利 申 请 C=100 M=8.5 Y=0 K=0 C=100 M=72 Y=0 K=18.5 使 不 可 能 成 为 可 能 NVivo 8 使 用 入 门 本 指 南 将 帮 助 您 初 步 了 解 和 掌 握 NVivo 它 提 供 了 NVivo 8 的 安 装 信 息, 介 绍 了 使 用 入 门 的 基 本 步 骤, 同 时 还 提 供 了 关 于 探 索 研 究 项 目 的 提 示 和 主 要 功

More information

使用 Scene7 Media Portal

使用 Scene7 Media Portal ADOBE SCENE7 MEDIA PORTAL http://help.adobe.com/zh_cn/legalnotices/index.html 2012/10/26 iii 1 : Media Portal.........................................................................................................

More information

MSAC-EX1

MSAC-EX1 3-218-418-62 (1) Memory Stick Duo ExpressCard MSAC-EX1 2-CS 2007 Sony Corporation 2007 Sony Corporation Memory Stick MagicGate Memory Stick Memory Stick Duo MagicGate Memory Stick Duo Memory Stick PRO

More information

Learning Java

Learning Java Java Introduction to Java Programming (Third Edition) Prentice-Hall,Inc. Y.Daniel Liang 2001 Java 2002.2 Java2 2001.10 Java2 Philip Heller & Simon Roberts 1999.4 Java2 2001.3 Java2 21 2002.4 Java UML 2002.10

More information

StorageTek Virtual Storage Manager GUI - 安全指南

StorageTek Virtual Storage Manager GUI - 安全指南 StorageTek Virtual Storage Manager GUI 安 全 指 南 发 行 版 1.0 E72350-01 2015 年 4 月 StorageTek Virtual Storage Manager GUI 安 全 指 南 E72350-01 版 权 所 有 2015, Oracle 和 / 或 其 附 属 公 司 保 留 所 有 权 利 本 软 件 和 相 关 文 档 是

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

Wireless Plus.book

Wireless Plus.book Seagate Wireless Plus 用 户 指 南 型 号 1AYBA2 Seagate Wireless Plus 用 户 指 南 2013 Seagate Technology LLC. 保 留 所 有 权 利 Seagate Seagate Technology Wave 徽 标 和 Seagate Media 是 Seagate Technology LLC 或 其 某 个 子 公

More information

内 容 协 作 平 台 TRS WCM 6.5 北 京 拓 尔 思 信 息 技 术 股 份 有 限 公 司 Beijing TRS Information Technology Co., Ltd 版 权 说 明 本 手 册 由 北 京 拓 尔 思 信 息 技 术 股 份 有 限 公 司 ( 以 下 简 称 TRS 公 司 ) 出 版, 版 权 属 TRS 公 司 所 有 未 经 出 版 者 正 式

More information

Cisco WebEx Meetings Server 2.6 版常见问题解答

Cisco WebEx Meetings Server 2.6 版常见问题解答 Cisco WebEx Meetings Server 2.6 版 常 见 问 题 解 答 介 绍 2 应 用 程 序 和 文 档 共 享 2 主 持 加 入 和 设 置 会 议 2 在 Chrome 和 Firefox 上 加 入 WebEx 会 议 或 播 放 会 议 录 制 文 件 4 适 用 于 移 动 设 备 的 Cisco WebEx 4 下 载 Cisco WebEx 应 用 程 序

More information

本 课 程 作 为 非 计 算 机 专 业 本 科 通 识 课 程, 是 一 门 理 论 和 实 践 紧 密 结 合 的 实 用 课 程, 内 容 包 括 计 算 机 基 础 部 分 和 程 序 设 计 部 分 计 算 机 基 础 部 分 涵 盖 计 算 机 软 硬 件 组 成 数 制 表 示 操

本 课 程 作 为 非 计 算 机 专 业 本 科 通 识 课 程, 是 一 门 理 论 和 实 践 紧 密 结 合 的 实 用 课 程, 内 容 包 括 计 算 机 基 础 部 分 和 程 序 设 计 部 分 计 算 机 基 础 部 分 涵 盖 计 算 机 软 硬 件 组 成 数 制 表 示 操 计 算 机 基 础 部 程 序 设 计 类 课 程 介 绍 1. Java 语 言 程 序 设 计 Java 简 介 Java 是 一 种 开 放 的 可 以 撰 写 跨 平 台 应 用 程 序 的 面 向 对 象 的 程 序 设 计 语 言 Java 技 术 具 有 卓 越 的 通 用 性 高 效 性 平 台 移 植 性 和 安 全 性, 广 泛 应 用 于 PC 数 据 中 心 科 学 超 级

More information

Microsoft Word - 改版式网页全文.doc

Microsoft Word - 改版式网页全文.doc 第 4 章 Dreamweaver CS3 高 级 篇 4.1 表 单 概 述 表 单 是 用 来 收 集 浏 览 者 的 用 户 名 密 码 E-mail 地 址 个 人 爱 好 和 联 系 地 址 等 用 户 信 息 的 输 入 区 域 集 合 浏 览 者 填 写 表 单 的 方 式 一 般 是 输 入 文 本 选 择 单 选 按 钮 或 复 选 框 以 及 从 下 拉 列 表 框 中 选 择

More information

CANVIO_AEROCAST_CS_EN.indd

CANVIO_AEROCAST_CS_EN.indd 简 体 中 文...2 English...4 SC5151-A0 简 体 中 文 步 骤 2: 了 解 您 的 CANVIO AeroCast CANVIO AeroCast 无 线 移 动 硬 盘 快 速 入 门 指 南 欢 迎 并 感 谢 您 选 择 TOSHIBA 产 品 有 关 您 的 TOSHIBA 产 品 的 详 情, 请 参 阅 包 含 更 多 信 息 的 用 户 手 册 () 安

More information

CA Nimsoft Monitor Snap 快速入门指南

CA Nimsoft Monitor Snap 快速入门指南 CA Nimsoft Monitor Snap 快 速 入 门 指 南 7.0 法 律 声 明 版 权 所 有 2013,CA 保 留 所 有 权 利 保 证 本 文 档 中 包 含 的 资 料 按 照 现 状 提 供, 将 来 版 本 中 如 有 更 改, 恕 不 另 行 通 知 另 外, 在 适 用 法 律 允 许 的 最 大 范 围 内,Nimsoft LLC 不 承 担 关 于 本 手 册

More information

無障礙網頁開發規範二版(草案)

無障礙網頁開發規範二版(草案) 國 家 通 訊 傳 播 委 員 會 無 障 礙 網 頁 開 發 規 範 2.0 版 ( 草 案 ) 委 辦 單 位 : 國 家 通 訊 傳 播 委 員 會 執 行 單 位 : 中 華 民 國 資 訊 軟 體 協 會 中 華 民 國 1 0 3 年 0 5 月 I II 目 錄 壹 前 言... 1 貳 適 用 範 圍... 2 參 用 語 釋 義... 3 肆 規 範 內 文... 14 一 規 範

More information

HP LaserJet Pro M1530 MFP Series User Guide - ZHTW

HP LaserJet Pro M1530 MFP Series User Guide - ZHTW LASERJET PRO M1530 MFP 系 列 使 用 者 指 南 HP LaserJet Pro M1530 MFP 系 列 使 用 者 指 南 著 作 權 與 授 權 2010 Copyright Hewlett-Packard Development Company, L.P. 除 著 作 權 法 允 許 的 範 圍 外, 若 未 經 事 先 書 面 許 可, 不 得 複 製 修 改

More information

1 SQL Server 2005 SQL Server Microsoft Windows Server 2003NTFS NTFS SQL Server 2000 Randy Dyess DBA SQL Server SQL Server DBA SQL Server SQL Se

1 SQL Server 2005 SQL Server Microsoft Windows Server 2003NTFS NTFS SQL Server 2000 Randy Dyess DBA SQL Server SQL Server DBA SQL Server SQL Se 1 SQL Server 2005 DBA Microsoft SQL Server SQL ServerSQL Server SQL Server SQL Server SQL Server SQL Server 2005 SQL Server 2005 SQL Server 2005 o o o SQL Server 2005 1 SQL Server 2005... 3 2 SQL Server

More information

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6 www.brainysoft.net 1.JasperReport ireport...4 1.1 JasperReport...4 1.2 ireport...4 2....4 2.1 JDK...4 2.1.1 JDK...4 2.1.2 JDK...5 2.1.3 JDK...5 2.2 ant...6 2.2.1 ant...6 2.2.2 ant...6 2.3 JasperReport...7

More information

FileMaker 15 WebDirect 指南

FileMaker 15 WebDirect 指南 FileMaker 15 WebDirect 2013-2016 FileMaker, Inc. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc. FileMaker WebDirect FileMaker, Inc. FileMaker

More information

Epson

Epson WH / MS CMP0087-00 TC WH/MS EPSON EPSON EXCEED YOUR VISION EXCEED YOUR VISION Seiko Corporation Microsoft and Windows are registered trademarks of Microsoft Corporation. Mac and Mac OS are registered trademarks

More information

Java Desktop System 呂衄盋 2 呂衄说柔

Java Desktop System 呂衄盋 2 呂衄说柔 Java Desktop System 2 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. : 817 7767 10 2004 10 2004 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Sun Sun

More information

epub 61-2

epub 61-2 2 Web Dreamweaver UltraDev Dreamweaver 3 We b We b We Dreamweaver UltraDev We b Dreamweaver UltraDev We b We b 2.1 Web We b We b D r e a m w e a v e r J a v a S c r i p t We b We b 2.1.1 Web We b C C +

More information

Epson

Epson RIP (ONYX RIP) CMP0097-00 TC RIP (ONYX RIP).... 3.... 3.... 3.... 4.... 5 EMX.... 7.... 10 RIP.... 14 ONYX RIP... 14 RIP.... 21 ONYX RIP... 21 ONYX RIP... 26.... 26.... 28.... 29 Dashboard EMX.... 31 /....

More information

Microsoft Word - Functional_Notes_3.90_CN.doc

Microsoft Word - Functional_Notes_3.90_CN.doc GeO-iPlatform Functional Notes GeO Excel Version 3.90 Release Date: December 2008 Copyrights 2007-2008. iplatform Corporation. All rights reserved. No part of this manual may be reproduced in any form

More information

声 明 本 公 司 及 全 体 董 事 监 事 高 级 管 理 人 员 承 诺 不 存 在 虚 假 记 载 误 导 性 陈 述 或 重 大 遗 漏, 并 对 其 真 实 性 准 确 性 完 整 性 承 担 个 别 和 连 带 的 法 律 责 任 本 公 司 负 责 人 和 主 管 会 计 工 作 的

声 明 本 公 司 及 全 体 董 事 监 事 高 级 管 理 人 员 承 诺 不 存 在 虚 假 记 载 误 导 性 陈 述 或 重 大 遗 漏, 并 对 其 真 实 性 准 确 性 完 整 性 承 担 个 别 和 连 带 的 法 律 责 任 本 公 司 负 责 人 和 主 管 会 计 工 作 的 声 明 本 公 司 及 全 体 董 事 监 事 高 级 管 理 人 员 承 诺 不 存 在 虚 假 记 载 误 导 性 陈 述 或 重 大 遗 漏, 并 对 其 真 实 性 准 确 性 完 整 性 承 担 个 别 和 连 带 的 法 律 责 任 本 公 司 负 责 人 和 主 管 会 计 工 作 的 负 责 人 会 计 机 构 负 责 人 保 证 公 开 转 让 说 明 书 中 财 务 会 计 资

More information

ME3208E2-1.book

ME3208E2-1.book DocuPrint 205/255/305 操 作 說 明 書 Adobe Adobe logo PostScript PostScript 3 及 PostScript logo 是 Adobe Systems Incorporated 的 商 標 Microsoft Windows Windows NT Windows Server 是 美 國 Microsoft Corporation 於 美

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

(untitled)

(untitled) Application Streaming 6.6 for Windows 2015-03-06 13:55:04 UTC 2015 Citrix Systems, Inc. All rights reserved. Terms of Use Trademarks Privacy Statement 目 录 Application Streaming 6.6 for Windows... 5 发 布

More information

VB程序设计教程

VB程序设计教程 高 等 学 校 教 材 Visual Basic 程 序 设 计 教 程 魏 东 平 郑 立 垠 梁 玉 环 石 油 大 学 出 版 社 内 容 提 要 本 书 是 按 高 等 学 校 计 算 机 程 序 设 计 课 程 教 学 大 纲 编 写 的 大 学 教 材, 主 要 包 括 VB 基 础 知 识 常 用 程 序 结 构 和 算 法 Windows 用 户 界 面 设 计 基 础 文 件 处

More information

<4D6963726F736F667420576F7264202D20C6F3D2B5CDF8D5BECFB5CDB3BCBCCAF5B9E6B7B6CAE9A3A8C6C0B9C0D3C3A3A92E646F63>

<4D6963726F736F667420576F7264202D20C6F3D2B5CDF8D5BECFB5CDB3BCBCCAF5B9E6B7B6CAE9A3A8C6C0B9C0D3C3A3A92E646F63> 企 业 门 户 网 站 系 统 技 术 规 范 书 1. 综 述 1.1. 本 技 术 规 范 书 是 实 施 企 业 门 户 网 站 系 统 ( 以 下 简 称 系 统 ) 项 目 的 技 术 规 范 及 说 明 内 容 包 括 系 统 功 能 系 统 性 能 系 统 架 构 软 硬 件 产 品 和 运 行 环 境 实 施 和 售 后 服 务 培 训 等 要 求 1.2. 本 技 术 规 范 书

More information

LaserJet Pro 100 Color MFP M175 User Guide - ZHCN

LaserJet Pro 100 Color MFP M175 User Guide - ZHCN 用 户 指 南 LASERJET PRO 100 COLOR MFP M175 LaserJet Pro 100 color MFP M175 用 户 指 南 版 权 与 许 可 2012 Copyright Hewlett-Packard Development Company, L.P. 未 经 事 先 书 面 许 可, 严 禁 进 行 任 何 形 式 的 复 制 改 编 或 翻 译, 除 非

More information

關於本書 l 3 PhoneGap Appcelerator Titanium Sencha Touch (wrapper framework) Native App PhoneGap Build Native App Hybrid App Java Objective-C Android SDK

關於本書 l 3 PhoneGap Appcelerator Titanium Sencha Touch (wrapper framework) Native App PhoneGap Build Native App Hybrid App Java Objective-C Android SDK 2 l 跨裝置網頁設計 Android ios Windows 8 BlackBerry OS Android HTML 5 HTML 5 HTML 4.01 HTML 5 CSS 3 CSS 3 CSS 2.01 CSS 3 2D/3D PC JavaScript

More information

AXIS P7224 Video Encoder Blade – Installation Guide

AXIS P7224 Video Encoder Blade – Installation Guide 安 装 指 南 AXIS P7224 刀 片 视 频 编 码 器 中 文 法 律 考 虑 事 项 视 频 和 音 频 监 视 可 能 会 受 法 律 限 制, 各 个 国 家 / 地 区 的 法 律 会 有 所 不 同 如 将 本 产 品 用 于 监 控 目 的, 需 要 先 检 查 是 否 符 合 你 所 在 区 域 内 的 法 律 规 定 本 产 品 包 括 四 个 (4) H.264 解 码

More information

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM Oracle Solaris Studio 12.2 DLight 2010 9 2 2 3 DLight 3 3 6 13 CPU 16 18 21 I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AMP Apache MySQL

More information

产品手册

产品手册 产 品 手 册 Norton 360 产 品 手 册 本 手 册 介 绍 的 软 件 基 于 授 权 许 可 协 议 提 供, 且 只 能 在 遵 守 协 议 条 款 的 前 提 下 使 用 文 档 版 本 22.5 Copyright 2015 Symantec Corporation. 2015 年 Symantec Corporation 版 权 所 有 All rights reserved.

More information

第二部分 成果简介

第二部分   成果简介 成 果 名 称 : 大 型 建 筑 物 复 杂 环 境 室 内 定 位 系 统 关 键 技 术 与 示 范 归 类 号 :431 成 果 持 有 单 位 : 北 京 邮 电 大 学 联 系 人 : 邓 中 亮 ; 联 系 电 话 :13911881798 推 荐 部 门 ( 单 位 ): 北 京 邮 电 大 学 适 用 范 围 : 随 着 位 置 服 务 的 蓬 勃 发 展 与 大 型 建 筑 的

More information

2005 Sun Microsystems, Inc Network Circle, Santa Clara, CA U.S.A. Sun Sun Berkeley BSD UNIX X/Open Company, Ltd. / Sun Sun Microsystems Su

2005 Sun Microsystems, Inc Network Circle, Santa Clara, CA U.S.A. Sun Sun Berkeley BSD UNIX X/Open Company, Ltd. / Sun Sun Microsystems Su Java Desktop System Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. : 819 0675 10 2005 2 2005 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Sun Sun Berkeley

More information

Java 1 Java String Date

Java 1 Java String Date JAVA SCJP Java 1 Java String Date 1Java 01 Java Java 1995 Java Java 21 Java Java 5 1-1 Java Java 1990 12 Patrick Naughton C++ C (Application Programming Interface API Library) Patrick Naughton NeXT Stealth

More information

Data Server_new_.doc

Data Server_new_.doc 0i B/C Data Server Windows 2000 Window XP Windows XP FTP FANUC Data Server FTP liwei@beijing-fanuc 1 06-10-8 Content 1. /...3 1.1...3 1.2...3 1.3 CNC...3 2....5 2.1 STORAGE...5 2.2 FTP...6 2.3 BUFFER...7

More information

中国软件2013校园招聘通知

中国软件2013校园招聘通知 中 国 软 件 2014 校 园 招 聘 通 知 公 司 介 绍 中 国 软 件 与 技 术 服 务 股 份 有 限 公 司 成 立 于 1980 年 ( 公 司 简 称 : 中 软 股 票 简 称 : 中 国 软 件 股 票 代 码 :600536), 是 中 央 管 理 的 国 有 重 要 骨 干 企 业 中 国 电 子 信 息 产 业 集 团 有 限 公 司 (CEC) 控 股 的 大 型 高

More information

Bridge/Version Cue

Bridge/Version Cue 2007 Adobe Systems Incorporated. Adobe Bridge CS3 Adobe Version Cue CS3 - Windows Mac OS Adobe Systems Incorporated Adobe Systems Incorporated Adobe Systems Incorporated Adobe Adobe Acrobat Adobe Premiere

More information

EMC® VNX® Series VNX8000™ Block 安装指南

EMC® VNX® Series VNX8000™ Block 安装指南 EMC VNX Series VNX8000 Block 安 装 指 南 300-999-791 REV 05 版 权 所 有 2014-2015 EMC Corporation 保 留 所 有 权 利 中 国 印 刷 发 布 日 期 : 2015 年 2 月 EMC 确 信 本 出 版 物 在 发 布 之 日 内 容 准 确 无 误 本 出 版 物 中 的 信 息 可 随 时 更 改 而 不 另

More information

Quick Start Guide

Quick Start Guide 1 1 1 2 2 3 4 7 8 13 Windows 13 Macintosh 15 17 19 USB ( Windows ) 19... 19 C QA7-3236-V01 Exif Exif Exif Exif ICES-003 (Digital Apparatus) Class B (ENERGY STAR ) (ENERGY STAR ) (ENERGY STAR) (ENERGY STAR

More information

1. 請 先 檢 查 包 裝 內 容 物 AC750 多 模 式 無 線 分 享 器 安 裝 指 南 安 裝 指 南 CD 光 碟 BR-6208AC 電 源 供 應 器 網 路 線 2. 將 設 備 接 上 電 源, 即 可 使 用 智 慧 型 無 線 裝 置 進 行 設 定 A. 接 上 電 源

1. 請 先 檢 查 包 裝 內 容 物 AC750 多 模 式 無 線 分 享 器 安 裝 指 南 安 裝 指 南 CD 光 碟 BR-6208AC 電 源 供 應 器 網 路 線 2. 將 設 備 接 上 電 源, 即 可 使 用 智 慧 型 無 線 裝 置 進 行 設 定 A. 接 上 電 源 1. 請 先 檢 查 包 裝 內 容 物 AC750 多 模 式 無 線 分 享 器 安 裝 指 南 安 裝 指 南 CD 光 碟 BR-6208AC 電 源 供 應 器 網 路 線 2. 將 設 備 接 上 電 源, 即 可 使 用 智 慧 型 無 線 裝 置 進 行 設 定 A. 接 上 電 源 B. 啟 用 智 慧 型 裝 置 的 無 線 Wi-Fi C. 選 擇 無 線 網 路 名 稱 "edimax.setup"

More information

Adobe Reader 5.0 or newer is required and must be installed to read the Operating Instructions. Unauthorized copying and distribution is a violation o

Adobe Reader 5.0 or newer is required and must be installed to read the Operating Instructions. Unauthorized copying and distribution is a violation o DP-8060-PK / 8045-PK / 8035-PK Adobe Reader 5.0 or newer is required and must be installed to read the Operating Instructions. Unauthorized copying and distribution is a violation of law. Panasonic Communications

More information

Sun Storage Common Array Manager 阵列管理指南,版本 6.9.0

Sun Storage Common Array Manager  阵列管理指南,版本 6.9.0 Sun Storage Common Array Manager 阵 列 管 理 指 南, 版 本 6.9.0 文 件 号 码 :E27519-01 2012 年 2 月 版 权 所 有 2007, 2011, Oracle 和 / 或 其 附 属 公 司 保 留 所 有 权 利 本 软 件 和 相 关 文 档 是 根 据 许 可 证 协 议 提 供 的, 该 许 可 证 协 议 中 规 定 了 关

More information

Epson

Epson NPD4775-03 TC No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, mechanical, photocopying, recording, or otherwise, without the prior

More information

VIDEOJET connect 7000 VJC-7000-90 zh- CHS Operation Manual VIDEOJET connect 7000 zh-chs 3 目 录 1 浏 览 器 连 接 7 1.1 系 统 要 求 7 1.2 建 立 连 接 7 1.2.1 摄 像 机 中 的 密 码 保 护 7 1.3 受 保 护 的 网 络 7 2 系 统 概 述 8 2.1 实 况

More information

Microsoft Word - ch02.doc

Microsoft Word - ch02.doc 第 2 章 认 识 Dreamweaver 8 教 学 提 示 :Dreamweaver 是 一 款 功 能 强 大 的 可 视 化 的 网 页 编 辑 与 管 理 软 件 利 用 它, 不 仅 可 以 轻 松 地 创 建 跨 平 台 和 跨 浏 览 器 的 页 面, 也 可 以 直 接 创 建 具 有 动 态 效 果 的 网 页 而 不 用 自 己 编 写 源 代 码 Dreamweaver 8

More information

声 明 本 公 司 及 全 体 董 事 监 事 高 级 管 理 人 员 承 诺 不 存 在 任 何 虚 假 记 载 误 导 性 陈 述 或 重 大 遗 漏, 并 对 其 真 实 性 准 确 性 完 整 性 承 担 个 别 和 连 带 的 法 律 责 任 本 公 司 负 责 人 和 主 管 会 计 工

声 明 本 公 司 及 全 体 董 事 监 事 高 级 管 理 人 员 承 诺 不 存 在 任 何 虚 假 记 载 误 导 性 陈 述 或 重 大 遗 漏, 并 对 其 真 实 性 准 确 性 完 整 性 承 担 个 别 和 连 带 的 法 律 责 任 本 公 司 负 责 人 和 主 管 会 计 工 Shenzhen WitSoft Information Technology Co., Ltd. 主 办 券 商 二 〇 一 六 年 二 月 声 明 本 公 司 及 全 体 董 事 监 事 高 级 管 理 人 员 承 诺 不 存 在 任 何 虚 假 记 载 误 导 性 陈 述 或 重 大 遗 漏, 并 对 其 真 实 性 准 确 性 完 整 性 承 担 个 别 和 连 带 的 法 律 责 任 本

More information

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile.. WebSphere Studio Application Developer IBM Portal Toolkit... 1/21 WebSphere Studio Application Developer IBM Portal Toolkit Portlet Doug Phillips (dougep@us.ibm.com),, IBM Developer Technical Support Center

More information

總行總務室

總行總務室 第 一 銀 行 104 年 專 業 甄 選 簡 章 中 華 民 國 104 年 3 月 27 日 公 告 目 錄 壹 甄 試 重 要 時 程 表... 1 貳 徵 才 類 別 需 才 地 區 報 考 資 格 條 件 及 錄 取 名 額... 2 參 報 名 方 式... 6 肆 甄 選 方 式... 7 伍 錄 取 與 進 用... 7 陸 其 他 注 意 事 項... 8 壹 甄 試 重 要 時

More information

untitled

untitled JavaEE+Android - 6 1.5-2 JavaEE web MIS OA ERP BOSS Android Android Google Map office HTML CSS,java Android + SQL Sever JavaWeb JavaScript/AJAX jquery Java Oracle SSH SSH EJB+JBOSS Android + 1. 2. IDE

More information

Microsoft Word - 28935样章.dot

Microsoft Word - 28935样章.dot 21 世 纪 高 职 高 专 规 划 教 材 系 列 何 福 贵 张 梅 编 著 机 械 工 业 出 版 社 IV 本 书 全 面 地 介 绍 了 网 页 制 作 技 术 及 其 相 关 理 论 全 书 共 分 12 章, 包 括 绪 论 网 站 的 创 建 与 管 理 网 页 基 本 元 素 实 现 网 页 页 面 布 局 实 现 表 单 的 应 用 CSS 与 模 板 使 用 Div 和 AP

More information

产品手册: CA GEN r8

产品手册: CA GEN r8 产 品 手 册 : CA GEN r8 CA Gen r8 CA Gen 是 一 个 成 熟 的 模 拟 驱 动 开 发 环 境, 用 来 设 计 部 署 和 维 护 高 性 能 可 扩 缩 的 企 业 应 用 程 序 集 成 模 型 和 代 码 生 成 使 您 能 够 运 用 平 台 独 立 的 应 用 程 序 来 运 行 您 的 关 键 任 务 进 程 灵 活 的 开 发 方 法 用 来 设 计

More information

Logitech Wireless Combo MK45 English

Logitech Wireless Combo MK45 English Logitech Wireless Combo MK45 Setup Guide Logitech Wireless Combo MK45 English................................................................................... 7..........................................

More information

Sophos Central 快速安裝手冊

Sophos Central 快速安裝手冊 Sophos Central 快速安裝手冊 1 1. Sophos Central...5 2....9 3....13 3.1. Enduser Protection...13 3.2. Intercept X...21 3.3....28 3.4....36 3.5....45 3.5.1...45 3.5.2...50 3.5.3...54 3.5.4...57 3.5.5...60 3.6...63

More information

ARIS Design Platform

ARIS Design Platform ARIS - 20045 ARIS 1 ARIS 6.................................................................4 2 ARIS 6.....................................................5 2.1 ARIS.......................................................................6

More information

Microsoft Word - 第1章 Android基本概念.docx

Microsoft Word - 第1章 Android基本概念.docx Android 系 统 下 Java 编 程 详 解 作 者 : 华 清 远 见 第 1 章 Android 基 本 概 念 本 章 简 介 本 章 主 要 介 绍 Android 基 本 概 念 方 面 的 内 容, 包 括 Android 平 台 特 性 Android 系 统 架 构 Android 开 发 框 架 和 Android 开 发 环 境 搭 建 1.1 Android 简 介 Android

More information

This page left blank intentionally

This page left blank intentionally Network Guide Guide Réseau Netzwerkbetrieb Guía de red Guida alla rete Netwerkhandleiding Guia de Rede Nätverksguide Руководство по работе в сети Regulatory models: W60, W61 010-0756-00 DISPERINDAG No.

More information

Microsoft Word zw

Microsoft Word zw 第 1 章 Android 概述 学习目标 : Android Android Android Studio Android Android APK 1.1 1. 智能手机的定义 Smartphone 2. 智能手机的发展 1973 4 3 PC IBM 1994 IBM Simon PDA PDA Zaurus OS 1996 Nokia 9000 Communicator Nokia 9000

More information

目 錄 版 次 變 更 記 錄... 2 原 始 程 式 碼 類 型 之 使 用 手 冊... 3 一 安 裝 軟 體 套 件 事 前 準 備... 3 二 編 譯 流 程 說 明... 25 1

目 錄 版 次 變 更 記 錄... 2 原 始 程 式 碼 類 型 之 使 用 手 冊... 3 一 安 裝 軟 體 套 件 事 前 準 備... 3 二 編 譯 流 程 說 明... 25 1 科 技 部 自 由 軟 體 專 案 原 始 程 式 碼 使 用 手 冊 Source Code Manual of NSC Open Source Project 可 信 賴 的 App 安 全 應 用 框 架 -App 應 用 服 務 可 移 轉 性 驗 證 Trusted App Framework -Transferability Verification on App MOST 102-2218-E-011-012

More information

Windows XP

Windows XP Windows XP What is Windows XP Windows is an Operating System An Operating System is the program that controls the hardware of your computer, and gives you an interface that allows you and other programs

More information

目录

目录 目 录 1 系 统 概 述... 1 1.1 主 要 功 能... 1 1.2 工 作 环 境 要 求... 2 1.2.1 硬 件 环 境... 2 1.2.2 操 作 系 统... 2 1.2.3 数 据 库... 2 1.2.4 浏 览 器... 2 2 安 装 卸 载... 3 2.1 安 装 步 骤... 3 2.2 使 用 加 密 狗... 5 2.3 卸 载 步 骤... 6 3 新

More information

设 计 竞 赛 内 容 和 评 分 标 准, 旨 在 引 导 职 业 学 校 电 子 商 务 计 算 机 市 场 营 销 等 相 关 专 业 的 教 学 改 革, 展 示 职 业 院 校 电 子 商 务 相 关 专 业 的 建 设 成 果, 推 动 电 子 商 务 职 业 教 育 的 发 展 和 创

设 计 竞 赛 内 容 和 评 分 标 准, 旨 在 引 导 职 业 学 校 电 子 商 务 计 算 机 市 场 营 销 等 相 关 专 业 的 教 学 改 革, 展 示 职 业 院 校 电 子 商 务 相 关 专 业 的 建 设 成 果, 推 动 电 子 商 务 职 业 教 育 的 发 展 和 创 2016 年 全 国 职 业 院 校 信 息 技 术 技 能 大 赛 电 子 商 务 技 术 赛 项 规 程 一 赛 项 名 称 赛 项 名 称 : 电 子 商 务 技 术 赛 项 组 别 : 中 职 组 赛 项 归 属 产 业 : 现 代 服 务 业 二 大 赛 目 的 在 2015 年 全 国 两 会 上, 李 克 强 总 理 将 互 联 网 作 为 一 项 战 略 性 新 兴 产 业, 首 次

More information

使 用 本 说 明 书 感 谢 您 购 买 三 星 手 机 本 手 机 基 于 三 星 的 高 科 技 和 高 标 准, 为 您 提 供 高 品 质 的 移 动 通 信 和 娱 乐 享 受 本 使 用 说 明 书 专 门 用 于 指 导 您 了 解 手 机 的 功 能 与 特 性 使 用 手 机 之

使 用 本 说 明 书 感 谢 您 购 买 三 星 手 机 本 手 机 基 于 三 星 的 高 科 技 和 高 标 准, 为 您 提 供 高 品 质 的 移 动 通 信 和 娱 乐 享 受 本 使 用 说 明 书 专 门 用 于 指 导 您 了 解 手 机 的 功 能 与 特 性 使 用 手 机 之 SCH-S569 使 用 说 明 书 使 用 本 说 明 书 感 谢 您 购 买 三 星 手 机 本 手 机 基 于 三 星 的 高 科 技 和 高 标 准, 为 您 提 供 高 品 质 的 移 动 通 信 和 娱 乐 享 受 本 使 用 说 明 书 专 门 用 于 指 导 您 了 解 手 机 的 功 能 与 特 性 使 用 手 机 之 前, 请 先 仔 细 阅 读 本 说 明 书, 以 确 保 安

More information

Chn 116 Neh.d.01.nis

Chn 116 Neh.d.01.nis 31 尼 希 米 书 尼 希 米 的 祷 告 以 下 是 哈 迦 利 亚 的 儿 子 尼 希 米 所 1 说 的 话 亚 达 薛 西 王 朝 二 十 年 基 斯 流 月 *, 我 住 在 京 城 书 珊 城 里 2 我 的 兄 弟 哈 拿 尼 和 其 他 一 些 人 从 犹 大 来 到 书 珊 城 我 向 他 们 打 听 那 些 劫 后 幸 存 的 犹 太 人 家 族 和 耶 路 撒 冷 的 情 形

More information

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

KillTest 质量更高 服务更好 学习资料   半年免费更新服务 KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : 070-647 Title : Windows Server 2008,Enterprise Administrator Version : Demo 1 / 13 1. Active directory Windows Server 2008 (WAN) WAN WAN A.

More information

<4D6963726F736F667420576F7264202D20312D3120D5D0B9C9CBB5C3F7CAE9A3A8C9CFBBE1B8E5A3A92E646F63>

<4D6963726F736F667420576F7264202D20312D3120D5D0B9C9CBB5C3F7CAE9A3A8C9CFBBE1B8E5A3A92E646F63> 创 业 板 投 资 风 险 本 次 股 票 发 行 后 拟 在 创 业 板 市 场 上 市, 该 市 场 具 有 较 高 的 投 资 风 险 创 业 板 公 司 具 有 业 绩 不 稳 定 经 营 风 险 高 退 市 风 险 大 等 特 点, 投 资 者 面 临 较 大 的 市 场 风 险 投 资 者 应 充 分 了 解 创 业 板 市 场 的 投 资 风 险 及 本 公 司 所 披 露 的 风 险

More information

目 录 第 五 部 分 第 六 部 分 第 七 部 分 第 八 部 分 投 标 邀 请 投 标 人 须 知 附 表 评 标 方 法 和 评 分 细 则 项 目 需 求 和 技 术 方 案 要 求 1

目 录 第 五 部 分 第 六 部 分 第 七 部 分 第 八 部 分 投 标 邀 请 投 标 人 须 知 附 表 评 标 方 法 和 评 分 细 则 项 目 需 求 和 技 术 方 案 要 求 1 政 府 采 购 招 标 文 件 ( 服 务 类 ) 第 二 册 项 目 编 号 :SDGP2016-224 项 目 名 称 : 公 共 法 律 服 务 系 统 开 发 项 目 包 号 :A1 山 东 省 省 级 机 关 政 府 采 购 中 心 目 录 第 五 部 分 第 六 部 分 第 七 部 分 第 八 部 分 投 标 邀 请 投 标 人 须 知 附 表 评 标 方 法 和 评 分 细 则 项 目

More information

PFO_300a_GSG_ENG.book

PFO_300a_GSG_ENG.book GPS Pathfinder Office 入 门 指 南 F 版 本 3.00 修 订 本 A 编 号 :34231-30-CHI 2004 年 5 月 Trimble Navigation Limited Mapping & GIS Business Area 7403 Church Ranch Blvd, Suite 100, Westminster, CO 80021, U.S.A. +1-720-887-4374

More information

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2.

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2. 2005-06 p.1 HTML HyperText Mark-up Language 1. HTML Logo, Pascal, C++, Java HTML 2. HTML (tag) 3. HTML 4. HTML 1. HTML 2. 3. FTP HTML HTML html 1. html html html cutehtmleasyhtml 2. wyswyg (What you see

More information

經濟統計資料庫管理資訊系統

經濟統計資料庫管理資訊系統 招 標 文 件 (1) 經 濟 部 投 資 審 議 委 員 會 全 球 投 資 審 議 管 理 資 訊 系 統 ( 第 3 期 ) 開 發 建 置 專 案 投 標 須 知 經 濟 部 投 資 審 議 委 員 會 中 華 民 國 95 年 2 月 經 濟 部 投 資 審 議 委 員 會 投 標 須 知 以 下 各 項 招 標 規 定 內 容, 由 機 關 填 寫, 投 標 廠 商 不 得 填 寫 或

More information

目 錄 使 用 者 介 面... 3 檔 案 頁 籤... 3 配 置... 4 狀 態 列... 4 功 能 區... 5 說 明... 5 文 件... 7 修 訂 雲 形... 7 標 註... 8 文 字... 9 幾 何 中 心 點 的 物 件 鎖 點... 10 等 角 製 圖 格 線.

目 錄 使 用 者 介 面... 3 檔 案 頁 籤... 3 配 置... 4 狀 態 列... 4 功 能 區... 5 說 明... 5 文 件... 7 修 訂 雲 形... 7 標 註... 8 文 字... 9 幾 何 中 心 點 的 物 件 鎖 點... 10 等 角 製 圖 格 線. AutoCAD 2016 新 功 能 預 覽 指 南 編 譯 版 本 :Y150327, 內 容 僅 供 學 習 參 考, 所 有 訊 息 請 以 官 方 資 訊 為 準, 更 多 資 訊 請 下 載 原 文 PDF 檔 或 觀 賞 Youtube 頻 道 的 示 範 影 片 Design every detail with Autodesk AutoCAD software, one of the

More information

致 理 技 術 學 院 商 務 科 技 管 理 系 實 務 專 題 報 告 MTA 國 際 證 照 - 資 料 庫 輔 助 教 學 系 統 學 生 : 楊 芬 綺 (19833210) 賴 筱 姍 (19833232) 藍 敏 臻 (19833233) 賴 嘉 宏 (19833236) 祝 子 洋

致 理 技 術 學 院 商 務 科 技 管 理 系 實 務 專 題 報 告 MTA 國 際 證 照 - 資 料 庫 輔 助 教 學 系 統 學 生 : 楊 芬 綺 (19833210) 賴 筱 姍 (19833232) 藍 敏 臻 (19833233) 賴 嘉 宏 (19833236) 祝 子 洋 致 理 技 術 學 院 商 務 科 技 管 理 系 實 務 專 題 報 告 MTA 國 際 證 照 - 資 料 庫 輔 助 教 學 系 統 學 生 : 楊 芬 綺 (19833210) 賴 筱 姍 (19833232) 藍 敏 臻 (19833233) 賴 嘉 宏 (19833236) 祝 子 洋 (19833249) 中 華 民 國 101 年 12 月 致 理 技 術 學 院 商 務 科 技 管

More information

Microsoft Word - 全華Ch4Ans.doc

Microsoft Word - 全華Ch4Ans.doc 得 分 : 101 學 年 度 第 2 學 期 全 華 Ch4 命 題 教 師 : 範 圍 : 年 班 號 姓 名 一 單 選 題 : (3) 1. 下 列 有 關 開 放 格 式 檔 案 的 檔 案 性 質 對 應, 何 者 有 誤? (1)gif: 圖 形 檔 (2)avi: 視 訊 檔 (3)odt: 簡 報 檔 (4)xlsx: 電 子 試 算 表 檔 ( 出 處 :4-3) 解 析 odt

More information

adm53mst.ps

adm53mst.ps IBM 5.3 IBM 5.3 2004 5 69 A, 77 D, IBM Copyright International Business Machines Corporation 2004. All rights reserved. ................ v............ vi............. vi..... vi Tivoli Access Manager...............

More information

untitled

untitled PowerBuilder Tips 利 PB11 Web Service 年度 2 PB Tips PB9 EAServer 5 web service PB9 EAServer 5 了 便 web service 來說 PB9 web service 力 9 PB11 release PB11 web service 力更 令.NET web service PB NVO 論 不 PB 來說 說

More information

XML/DTD (1) XML (Markup) SGML HTML XML XML XML 2004/7/ All Rights Reserved 2

XML/DTD (1) XML (Markup) SGML HTML XML XML XML 2004/7/ All Rights Reserved 2 XML/DTD (1) XML (Markup) SGML HTML XML XML XML 2004 All Rights Reserved 2 SGML Standard Generalized Markup Language ( ) XML Extensible Markup Language HTML HyperText Markup Language 2004 All Rights Reserved

More information

XP-225 Series

XP-225 Series NPD5089-01 TC Seiko Epson Corporation Epson Epson 2014 Seiko Epson Corporation.All rights reserved. 2 EPSON EPSON EXCEED YOUR VISION EXCEED YOUR VISION Seiko Epson Corporation PRINT Image Matching PRINT

More information

Microsoft Word - 04.doc

Microsoft Word - 04.doc 第 4 章 Dreamweaver 基 础 应 用 在 Dreamweaver 中, 创 建 网 页 非 常 简 单 用 户 只 要 熟 悉 Word 文 档 的 编 写, 就 可 以 以 所 见 即 所 得 的 方 式, 在 网 页 中 插 入 文 本 图 像 Flash 及 超 链 接 等 内 容, 从 而 制 作 出 各 式 各 样 的 网 页 本 章 将 详 细 讲 解 如 何 在 网 页

More information

mvc

mvc Build an application Tutor : Michael Pan Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist - UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication

More information