RSS

Monthly Archives: August 2011

AIR for TV HelloWorld application

The following exercise can help you understand the basics of developing AIR 2.5
applications that run on AIR for TV. You will use your computer and the Adobe
MAX 2010 AIR for TV Hardware Development Kit in the MAX 2010 Device Lab to
create and run a simple HelloWorld AIR 2.5 application.
Prerequisites and equipment
The following prerequisites will help you get the most from this session:
• Previous experience with, knowledge of Flash Professional and other
Adobe Flash tools
• Previously experienced developing Flash or AIR applications
• Experience with/knowledge of ActionScript 3 programming
• Strong interest in creating AIR for TV applications
To complete this exercise, you will also need the following equipment:
• A personal computer running either Mac OS X 10.6 or Windows XP or
greater connected with Flash Profession CS5 installed
• A USB flash drive with at least 100MB of free space

Youʼll also need the MAX 2010 AIR for TV Jumpstart Kit, which can be provided
to you by a member of the Adobe AIR for TV team. The Jumpstart Kit contains
all the software and documentation you will need to use the Adobe MAX 2010
AIR for TV Hardware Development Kit. Youʼll need it for this exercise and for
your future AIR for TV application development, as well.
AIR for TV HelloWorld Exercise
1. If you have not done so already, get a copy of the MAX 2010 AIR for TV
Jumpstart Kit from the AIR for TV staff member in the device lab. Save it on
your personal computer in a location thatʼs easy for you to remember
2. Open the Jumpstart Kit and find the file FlashProCS5ExtAIR25 beta.zxp.
Double click it to install the Flash Professional CS5 Extension for AIR 2.5
(beta). Accept the extension and install it.
3. Start Flash Professional and
go to File> New Flash project>Adobe AIR 2 to
create a new FLA file.
4. Be sure the USB flash drive you brought to the lab is connected to your
computer. Name the FLA file HelloWorld and save it to the root of the USB
drive.
5. (Optional) Change the Stage color of your app by clicking the Stage color
button in the properties window.
6. Add the text HelloWorld somewhere on the stage by going to Windows-
>Tools, choosing the Text tool, and clicking on the stage and typing
HelloWorld.
7. Change to the Selection tool, select the text field, and in the properties panel
change the type of the text field to Classic Text and Static Text.
8. Run your application on the computer by going to ControlTest Moviein
AIR Debug Launcher (Desktop) and verify that you see the text ʻHelloWorldʼ in
the application window.
Go to File > Publish Settings. Go to the Flash tab. Choose Adobe AIR 2.5 for
Player. Click the Settings button. Click the Signature tab. Check the option
ʻPrepare an AIR Intermediate (AIRI) file that will be signed laterʼ, as shown
below.
NOTE: The AIR for TV developer workflow does not require you to use a
signed .AIR file, just an .AIRI file. The .AIRI format is exactly the same as .AIR
except it is not digitally signed.
10.Go to the General tab and set the Output file location to the root of your USB
flash drive. Leave the profile selections all checked.
11.Publish your AIR application by going to File>Publish
12.Verify that the HelloWorld.airi file is on your USB flash drive.
13.Eject the USB flash drive and insert it into the USB port on the back of the
AIR for TV device.
14.Use the AIR for TV unit remote control to navigate to the Marketplace
application and run it. Select the tab Install from USB. You should see a list of
AIR applications available to install, including the application called
HelloWorld that you just created.
15.Select and install the HelloWorld application and exit the Marketplace
application. This will take you to the AIR for TV App Launcher.
16.Navigate through the App Launcher and locate the HelloWorld application.
17.Run the application and verify that you see the text ʻHelloWorldʼ on the TV
screen you have connected to the AIR for TV unit.
Congratulations. You have created and installed your first AIR for TV application.
For additional information about getting started with AIR for TV, go to the
documents in the MAX 2010 AIR for TV Jumpstart Kit.

Click here for view PDF

Advertisements
 
Leave a comment

Posted by on August 29, 2011 in Adobe Air

 

Uploading images from CameraRoll and CameraUI

Getting the media promise

The first step is to request the image from either the CameraRoll or the CameraUI object. In both cases, you create the appropriate object, set up some event listeners, and then call the function that asks for the image. The runtime then returns the image in an event containing the media promise after the user has either chosen a picture from the device media library or taken a new picture with the camera.

CameraRoll

The following code example sets up the event listeners necessary to handle the events that can be dispatched by a CameraRoll object and then calls the browseForImage() method. When the user selects an image, the runtime calls an event handler function named, imageSelected.
//declare cameraRoll where it won’t go out of scope
var cameraRoll:CameraRoll = new CameraRoll();

if( CameraRoll.supportsBrowseForImage )
{
cameraRoll.addEventListener( MediaEvent.SELECT, imageSelected );
cameraRoll.addEventListener( Event.CANCEL, browseCanceled );
cameraRoll.addEventListener( ErrorEvent.ERROR, mediaError );
cameraRoll.browseForImage();
}
else
{
trace( “Image browsing is not supported on this device.”);
}

CameraUI

The code for requesting an image from the CameraUI object is very similar:
private var cameraUI:CameraUI = new CameraUI();
if( CameraUI.isSupported )
{
trace( “Initializing…” );
cameraUI.addEventListener( MediaEvent.COMPLETE, imageSelected );
cameraUI.addEventListener( Event.CANCEL, browseCanceled );
cameraUI.addEventListener( ErrorEvent.ERROR, mediaError );
cameraUI.launch( MediaType.IMAGE );
}
else
{
trace( “CameraUI is not supported.”);
}

Click here for Download soruce.

 
 

New Features in AIR 3

Captive Runtime Support — This popular feature from AIR for iOS is now available with AIR for desktop and Android. Simplify the app installation process and reduce testing/certification cost by packaging the AIR runtime with your app on Windows, Mac, and Android.

Stage Video Hardware Acceleration (new for AIR) — Leverage hardware acceleration of the entire video pipeline to deliver efficient, best-in-class high-definition (HD) video playback experiences. Decrease processor usage and enable smoother video, reduced memory usage, and higher fidelity on mobile* and TV devices (*supported on Android 3.1, BlackBerry Tablet OS, and iOS).

Front-facing Camera Support (new for AIR Android) — The front-facing camera support available with AIR for iOS and BlackBerry Tablet OS is now available on Android devices. Take advantage of the frontfacing camera to help users connect with rich video conferencing and chat experiences on smartphones and tablets.

Camera Position API — A new property for the Camera class that enables developers to determine whether a camera is front or rear facing.

Background Audio Playback Support on iOS — Developers can now write multitasking iOS applications that can play audio while in the background, such as music applications or reliable voice conferencing apps with multitasking support.

Encrypted Local Storage for Mobile — Extends encrypted local storage support to mobile devices. Allows applications to more securely store sensitive data on a user’s device, enabling support for storage of sensitive data such as passwords, certificates, and auditing information.

Device Speaker Control — Provides developers the ability to select whether audio should be outputted through the phone speaker or external speaker.

 
Leave a comment

Posted by on August 25, 2011 in Adobe Air

 

New Features in Flash Player 11

Native 64-bit Support (Flash Player desktop) — Take advantage of native support for 64-bit operatingsystems and 64-bit web browsers on Linux, Mac OS, and Windows.

Asynchronous Bitmap Decoding (new for Flash Player) — Improve app responsiveness and deliversmoother animation by decoding images on initial load instead of on demand. Images are cached asneeded.

TLS Secure Sockets Support (new for Flash Player) — Enables secure communications for client/serverapplications.

 
Leave a comment

Posted by on August 25, 2011 in flash

 

New Features in Flash Player 11 and AIR 3

Stage3D Accelerated Graphics Rendering (desktop) — Stage3D (“Molehill”) is a new architecture for hardware accelerated graphics rendering developed by Adobe. Stage3D provides a set of low-level APIs that enable advanced 2D/3D rendering capabilities across screens and devices (desktop, mobile, and TV). It gives 2D and 3D app and framework developers access to high performance GPU hardware acceleration,enabling the creation of new classes of rich, interactive experiences. Note: Stage3D for mobile will be enabled in a future release.

Flash Access Content Protection Support for Mobile — Flash Access content protection support is now available on mobile devices.

H.264/AVC Software Encoding for Cameras (desktop) — Stream high quailty video from your computer’s camera with higher compression efficiency and industry-wide support, enabling both immersive real-time communications (e.g., video chat and video conferencing) and live video broadcasts.

Native JSON (JavaScript Object Notation) Support — Allows ActionScript developers to take advantage of high performance native parsing and generation of JSON-formatted data. Developers can integrate existing data seamlessly into their projects.

G.711 Audio Compression for Telephony — Support interoperability with legacy phone systems via the Flash Media Gateway (FMG) and other third-party clients (through the open RTMP protocol) without the need for transcoding.

Garbage Collection Advice — Provides smoother, more responsive user experiences by allowing developers to provide hints to optimize garbage collection scheduling.

Cubic Bezier Curves — The cubicCurveTo drawing API allows developers can easily create complex cubic Bezierswithout requiring custom ActionScript code.

Secure Random Number Generator — Developers can now take advantage of cryptographically secure random number generation to build more secure algorithms and protocols.

Protected HTTP Dynamic Streaming (HDS) and Flash Access Enhancements — Protected HTTP Dynamic Streaming (HDS) provides protection for streaming video across screens while eliminating the deployment complexity of a license server. New Flash Access content protection features include key rotation support, V3 license chaining, domain support, and enhanced output protection and device filtering.

Socket Progress Events — Improve management of data transfer using the Socket class by providing a new property to determine the number of bytes remaining in the write buffer and a new event for when data is being sent to the network layer. The new APIs allow applications can easily track progress and provide responsive feedback.

Native Text Input UI (mobile) —Mobile apps can now take advantage of the native text input controls on mobile platforms, including platform-specific user interaction behaviors such as magnification and text selection. Native text controls are available on Android, BlackBerry Tablet OS, and iOS operating systems.

JPEG-XR support — Flash Player and AIR now include support for the JPEG-XR advanced image compression standard (International Standard ISO/IEC 29199-2). The computationally lightweight JPEG-XR format provides more efficient compression than JPEG, enables both lossy and lossless compression support, and adds support for alpha channel transparency.

Enhanced high resolution bitmap support — BitmapData objects are no longer limited to a maximum resolution of 16 megapixels (16,777,215 pixels), and maximum bitmap width/height is no longer limited to 8,191 pixels, enabling the development of apps that utilize very large bitmaps.

High efficiency SWF compression support — Developers can now take advantage of LZMA compression for their SWF files. LZMA compression can reduce SWF size by up to 40%, enabling users to benefit from richer experiences with shorter download times and reduced bandwidth consumption.

DisplayObjectContainer.removeChildren and MovieClip.isPlaying — DisplayObjectContainer now implements a removeChildren API allowing developers to quickly remove all of a container’s children using a single API call. A new MovieClip.isPlaying property returns the MovieClip’s current playing state.

 
Leave a comment

Posted by on August 25, 2011 in Adobe Air

 

flash.display.Stage3D

Stage3D A high-performance rendering surface for 3D content defined using Context3D. The Player Stage predefines a number of Stage3D objects. Content drawn to Stage3D is composited with other visible Player display objects in a predefined order. The most distant are all StageVideo surfaces. Stage3D comes next, with traditional Flash display object content being rendered last, on top of all others. StageVideo and Stage3Dare rendered with no transparency. Player display object content is rendered with transparency. A Stage3D surface is retreived from the Player stage using its stage3Ds member.
stage.Stage3Ds[0].addEventListener ( Events.CONTEXT3D_CREATE, myContext3DHandler );
stage.Stage3Ds[0].requestContext3D ( );
function myContext3DHandler ( event : Event ) : void {
var t : Stage3D = event.target as Stage3D;
myContext3D = t.context3D;
InitAll3DResources ( myContext3D );
StartRendering ( myContext3D );
}

 
Leave a comment

Posted by on August 22, 2011 in Action Script3, Adobe Air, flash

 

Adobe Flash Player 11 Beta

Key benefits of the Flash Player 11 desktop beta include:

  • Stage3D APIs — Deliver cutting edge three dimensional experiences on the desktop.
  • Native 64-bit support — Support for 64-bit operating systems and browsers on Linux, Mac OS, and Windows.
  • G.711 audio compression for telephony — Integrate real-time voice and telephony capabilities into business apps and integrate with existing phone systems using the G.711 codec.
  • H.264/AVC SW Encoding — Create apps that encode higher quality video locally using the efficient H.264 video standard.
  • Socket Progress Events — Improve management of data transfer, track progress, and provide responsive feedback in apps send large amounts of data.
  • JPEG-XR support — Take advantage of support for the advanced JPEG-XR image compression format to deliver higher quality images with less bandwidth, and leverage lossy and lossless compression with alpha channel transparency.
 
Leave a comment

Posted by on August 22, 2011 in flash