getting started with adobe air 1.5

26
Getting Started with Adobe Getting Started with Adobe AIR AIR Flex Camp Chicago 2009 Flex Camp Chicago 2009

Upload: elad-elrom

Post on 29-Jun-2015

2.195 views

Category:

Technology


3 download

DESCRIPTION

Flex Camp Chicago 2009 presentation by Elad Elrom showing getting started with Adobe AIR as well as AIR 1.5 / Flash 10 capabilities.

TRANSCRIPT

Page 1: Getting Started with Adobe AIR 1.5

Getting Started with Adobe AIRGetting Started with Adobe AIR

Flex Camp Chicago 2009Flex Camp Chicago 2009

Page 2: Getting Started with Adobe AIR 1.5

Who Am I?1. Independent Consultant2. Technical Lead3. Author and technical writer

Page 3: Getting Started with Adobe AIR 1.5

Adobe AIR Presentation Agenda:-Intro and overview-Showing sample AIR apps-Installing & Building apps-Signing & deploying app- questions

Page 4: Getting Started with Adobe AIR 1.5

What is Adobe AIR?Adobe Integrated Runtime (AIR) is a

cross-operation system runtime, that allows developers to leverage their

existing Web knowledge skills in HTML, Ajax, XML, Flash and Flex to

build and deploy Rich Internet Application (RIA) on the desktop and

soon on Mobile devices.

Page 5: Getting Started with Adobe AIR 1.5

Adobe AIR architecture

Page 6: Getting Started with Adobe AIR 1.5

Adobe AIR 1.5 & Flash 10

Page 7: Getting Started with Adobe AIR 1.5

3D Effects

The Flash Player 10 3D tool API allows you to

take any pixel or container and

move it around in a 3D space.

Page 8: Getting Started with Adobe AIR 1.5

Custom Filters & Effects

The Pixel Bender just-in- time (JIT) compiler can also be leveraged and used to process other data, such as sound or logic.

Page 9: Getting Started with Adobe AIR 1.5

Text Layout Framework

Text Layout Framework (TLF) is Adobe new Flash framework for dealing with text consist of set of classes in Flash Player 10 that brings print-quality to the web and allow you to create multilingual web applications using device fonts.

Page 10: Getting Started with Adobe AIR 1.5

Enhanced Sound APIDynamic sound generation – the sound APIs allow creating sound dynamically and generate audio applications such as music mixers. You can work with loaded MP3 audio at a lower level by extracting audio data and supplying it to the sound buffer. It allows to process, filter, and mix audio in real time using the Pixel Bender compiler. Speex audio codec – In addition to supporting ADPCM, HE-AAC, MP3, and Nellymoser audio. Flash 10 also support new, high fidelity open source voice codec called Speex (www.speex.org/), which deliver low-latency for voice encoding and adds to the Microphone class.

Page 11: Getting Started with Adobe AIR 1.5

Visual Performance • Hardware• Acceleration• Vector

•Dynamic• Streaming• Color correction

Page 12: Getting Started with Adobe AIR 1.5

Enhance Drawing APIWinding fill - When two shapes used to intercepts we used to have an empty hole. Winding fill means that we have an area fill as long as we have the winding in the same direction.

UV Maps – used in After Effects and other Adobe Video products and allow mapping on a 3D space.

Graphics.drawPath – Uses a list of drawing commands and coordinate to create a pixel.

Graphics.drawTriangles – Take Vector data and renders a set of triangles, typically to distort containers and give them a 3D z dimension.

Page 13: Getting Started with Adobe AIR 1.5

Reading writing local filesFlash Player 10 has exposed two new APIs in FileReference: load and save.

Page 14: Getting Started with Adobe AIR 1.5

File I/O API

AIR allows you to access the local file system on the client machine the same as native OS programs. You can do common operations such as reading, writing, moving and renaming.

File.copyTo() vs File.copyToAsync()File.deleteDirectory() vs File.deleteDirectoryAsync()File.deleteFile() vs File.deleteFileAsync()

Page 15: Getting Started with Adobe AIR 1.5

Local storage and Encrypted SQLite

Adobe AIR 1.5 closed a security gap. All AIR applications are using the exact same database, so essentially any AIR application can read other applications database.

Page 16: Getting Started with Adobe AIR 1.5

Application Update and Notification API

AIR 1.5 updated the Updater API and assist you updating an existing application. In AIR 1.5 you can actually change the certificate of the application. To update an application the application ID and the publisher ID should match.

Page 17: Getting Started with Adobe AIR 1.5

Network AwarenessAIR is built to run in conditions where the network connection is changing. There is an event being lunched every time the application connect and disconnect from the internet allowing you to create an application that have network connection awareness.

air.NativeApplication.nativeApplication.addEventListener(air.Event.NETWORK_CHANGE, onNetworkChange);

var socketMonitor:SocketMonitor = new SocketMonitor('www.YourSite.com', 80); socketMonitor.addEventListener(StatusEvent.STATUS, statusChangeEventHandler); socketMonitor.start();

Page 18: Getting Started with Adobe AIR 1.5

Native Windowing API and Chrom Control

There are three types of windows: Normal - A normal typical windowUtility - A tool paletteLightweight - Lightweight windows with no chrome

Page 19: Getting Started with Adobe AIR 1.5

Example Of AIR Applications1. Pandora2. Google Analytics Reporting Suite3. EarthBrowser4. YouTube Mobile

Page 20: Getting Started with Adobe AIR 1.5

Pandora

Page 21: Getting Started with Adobe AIR 1.5

Google Analytic

Page 22: Getting Started with Adobe AIR 1.5

Earth Browser

Page 24: Getting Started with Adobe AIR 1.5

Web Browser Adobe AIR App<Script><![CDATA[

import flash.html.HTMLLoader;import mx.core.UIComponent;

private var htmlPage:HTMLLoader = null;

private function onStartup() : void { htmlPage = new HTMLLoader(); htmlPage.width = HTMLComponent.width; htmlPage.height = HTMLComponent.height; HTMLComponent.addChild(htmlPage); htmlPage.load(new URLRequest(txtUrl.text)); }

private function onKeyDown(event:KeyboardEvent):void { if (event.keyCode == Keyboard.ENTER) htmlPage.load(new URLRequest(txtUrl.text));}

]]></Script>

<?xml version="1.0" encoding="utf-8"?><WindowedApplication xmlns="http://ns.adobe.com/mxml/2009"width="750" height="600"creationComplete="onStartup()">

<Form width="100%"><FormItem label="Url" width="630"><TextInput id="txtUrl" width="630" text="file.pdf" keyDown="onKeyDown(event)" /></FormItem>

<UIComponent id="HTMLComponent" width="630" height="400" /></Form>

</WindowedApplication>

Page 25: Getting Started with Adobe AIR 1.5

Custom Menus<Script><![CDATA[

private var itemDS:NativeMenuItem = new NativeMenuItem("Drop Shadow");private var itemBlur:NativeMenuItem = new NativeMenuItem("Blur");

private function onCreationComplete() : void { var filterMenu:NativeMenuItem = new NativeMenuItem("Filters"); if(NativeWindow.supportsMenu) { stage.nativeWindow.menu = new NativeMenu(); stage.nativeWindow.menu.addItem(filterMenu); }

if(NativeApplication.supportsMenu) NativeApplication.nativeApplication.menu.addItem(filterMenu); var filterSubMenu:NativeMenu = new NativeMenu(); itemBlur.addEventListener(Event.SELECT,onMenuSelect); itemDS.addEventListener(Event.SELECT,onMenuSelect);

filterSubMenu.addItem(itemBlur); filterSubMenu.addItem(itemDS); filterMenu.submenu = filterSubMenu;}

private function onMenuSelect(event:Event):void { var nativeMenu:NativeMenuItem = event.target as NativeMenuItem; var filters:Array = []; nativeMenu.checked = !nativeMenu.checked; if (itemDS.checked ) filters.push(new DropShadowFilter()); if (itemBlur.checked ) filters.push(new BlurFilter()); image.filters = filters;}

]]></Script>

Page 26: Getting Started with Adobe AIR 1.5

Shameless Self PromotingBlog: http://elromdesign.com/blogLinkedIn: http://linkedin.com/in/eladelromTwitter: http://twitter.com/eladnycBooks: http://amazon.com/s/field-

keywords=elad+elrom