Archive for the ‘Flash’ Category

Background Audio Playback for mobile Adobe AIR apps!

Tuesday, October 18th, 2011

If you build a mobile Adobe AIR app to play or stream audio, the user expects that the music continues to playback when the app goes in the background. When I developed ON AIR powered by ( application using Adobe AIR and targeting tablet devices), had to solve this problem.

Dependent mobile platform, you have to do different things to enable the audio playback in the background!

BlackBerry PlayBook Tablet OS

The PlayBook normally pauses your app, when the app is going into the background and stops everything including the playback of the audio. This is the default behaviour. QNX (Part of RIM/BlackBerry) provides two ActionScript3 libraries which allows to the OS UI Components (qnx-screens.swc) in your app or use OS features or capabilities like QNXSystemPowerMode (qnx-air.swc). These libraries will be shipped with the latest version 4.5.1 of Flash Builder. To add the BlackBerry ActionScript Libraries to the project, you have to enable a property “Add platform specific libraries to library path” in the Project Properties (Flex Build Packaging -> BlackBerry Tablet OS).

After enabling the libraries, you only have to add the following lines which sets the PowerMode when the app inactive in the background to THROTTLED.

import qnx.system.QNXSystem;
import qnx.system.QNXSystemPowerMode;

qnx.system.QNXSystem.system.inactivePowerMode = QNXSystemPowerMode.THROTTLED;

In the PowerMode THROTTLED, the AIR runtime is stopping the rendering but still executes the code to playback the audio.

Here is the documentation about the PowerMode of QNX.

Google Android

On Android, the audio playback in the background is dependent of the device OS version. As multitasking on Android is available since version 3.0 (Honeycomb), only apps running on devices using Honeycomb or later will playback audio in the background.

To ensure that the app is still running when the user isn’t doing anything, you should add following line to keep the app awake.


Here is the corresponding ActionScript3 documentation. To enable the AIR app to change system idle, the Android part of the AIR App Descriptor file has to contain the following uses permessions.

<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>

Apple iOS

Normally, an AIR app (or native app) on iOS is stopping the audio playback when the app is going in the background. With Adobe AIR 3.0, you can enable the Background Audio Playback for AIR application. Add the parameter UIBackgroundModes with the value audio to the iOS part of the app descriptor of your application.


Currently, AIR 3.0 has problem with the screen lock of iOS, which is disabling the background audio playback.
To prevent the screen lock on iOS, your app should use the System Idle Mode KEEP_AWAKE.


Flash Mobile Device Simulation and Update for PlayBook Device Simulation released!

Thursday, May 26th, 2011

I released the first version of the Flash Mobile Device Simulation and an update of the PlayBook Device Simulation tonight. After the great response on the PlayBook Device Simulation, I decided to extend the solution and provide something similar for all mobile platforms supporting AIR applications. I recreated the ActionScript Simulation Library  and the AIR Simulator application from scratch. The Flash Mobile Device Simulation provides features which are available for all mobile platforms and core functionality for the comminication between the mobile application and the AIR Simulator application. The PlayBook Device Simulation extends the Flash Mobile Device Simulation with PlayBook specific features.

The first version of the Flash Mobile Device Simulation supports Geolocation and Accelerometer and provides the possibilty to import simulation information as XML data, for example as GPS Exchange Format 1.1 (GPX) waypoints.

Additionally to the new features of the Flash Mobile Device Simulation, the PlayBook Device Simulation was updated to implement the latest BlackBerry PlayBook SDK 1.0.1 and supports qnx.system.QNXSystem. To run the PlayBook Device Simulation, you have download both ActionScript libraries.

Incubator Version of Flash Player 11 supporting 3D “Molehill” API and compatible 3D Frameworks released!

Monday, February 28th, 2011

On time for Flash Game Summit in San Fransisco today, Adobe started a new Incubator Programm for the Flash Platform and released the first public incubator version of the Flash Player 11 supporting the 3D Molehill API. It’s available for download on Adobe Labs.

Adobe’s Product Manager for the Flash Runtimes Thibault Imbert blogged about the features of Molehill and how they will change the web. 😉 You will find an overview of frameworks supporting Mlehill.

Away3D published the first public alpha build of version 4.0 (codename Brommstick) supporting Molehill.

The video below shows a water simulation with 80,000 triangles, which were rendered on the GPU and manipulated on the CPU.

To create cool 3D Games, you also need physics engine. 3D Physics Engine Jiglibflash released a new version today, which support Away3D 4.0 “Brommstick”.

Another big announcement came from Unity today. They announced the support of Flash Player as runtime using Molehill. After a successful investigation of the new Flash Player capabilities, they are moving into full production. Flash Player will be an additional output for the web to their own Web Player.

There are also some demos of Molehill available online:

Away3D 4.0 Brommstick:

Zombie Tycoon from Frima Studio :

Quake3 Map from Minko:

If you want to start playing with Molehill take a look on the blog post of Tinic Uro from Adobe. There is a sample availbale for download.

First version of PlayBook Device Simulation released!

Tuesday, February 22nd, 2011

Today, I released little private project “PlayBook Device Simulation” that allows to use PlayBook specific API when develop with the AIR Debug Launcher (ADL). The solution consists of two parts: an ActionScript3 Library (PlayBook Device Simulation) and an AIR application (PlayBook Device Simulator).

I ported some of the classes of the QNX AIR Library, so that the classes have some functions and variables (1:1). Currently supported classes and features: AudioManager, Device, MediaServiceConnection and QNXApplication. My solutions supports features, which can’t be test with the VMware Image of the PlayBook Device Simulator, like Power Management (Battery).  Another reason to test the solution is that won’t get any error messages (VerifyError: Error #1014: Class qnx.pps::PPSChannel could not be found) when using any of the supported classes.

Technically, I’m using the ServerSocket API of Adobe AIR to connect the Mobile AIR Application with the PlayBook Device Simulator. This allows a two communication between the Mobile AIR Application and the simulator.

Additional information about integration and usage can be found on the project site:

Open Source Media Framework vs. Strobe Media Playback vs. Flash Media Playback

Thursday, November 18th, 2010

When I joined the private prerelease of Adobe for the current the Open Source Media Framework last year, the code name of the project was Strobe and was changed after a while by the Adobe Marketing into the current name. My confusion was perfect as the Strobe Media Playback entered the stage and reused the code name …… Now Adobe provides also the Flash Media Playback.

So I decided to blog about Adobe’s current Video Player projects, because there are at the moment different projects for Video and Media Player provided by Adobe. This post should clearify the difference between all the projects.

Open Source Media Framework (OSMF)

The Open Source Media Framework is open source project developed by Adobe and their partners like Akamai. The frameworks should easy the development of custom Flash based  Media or Video Players and should solve general problems and topic of the development of Video Players. The main goal of the project is to provide the code base for a players so that developers have only to focus on the integration with the site and user experience instead of write the basic logic of a player from scratch.

The framework provides the logic to play videos and audio (progressive download, DVR, RTMP or HTTP streaming) or display other media objects like SWF and images, the creation of playlists (sequenctial or parallel) and handles the DRM based on Flash Access 2.0.

Additionally, the Open Source Media Framework can be extended by using one or more of the existing plugins for Advertising, Analytics and Qualtity Service, Content Delivery and writing your own plugin to integrate the video player with backend.

The source code of OSMF also contains plugins for VAST 1 and VAST2 standard of the IAB (Interactive Advertising Bureau), which will be used by almost all major advertising companies.

Adobe hosts a special Market Place for OSMF, which provides a couple of plugins for OSMF.

The solution targets developers who want to write their own video players based on ActionScript or Flex and provides the basic logic to play videos.

Strobe Media Playback (Strobe)

The Strobe Media Playback is open source Media Player on top of the Open Source Media Framework. It’s sample implementation of an OSMF based video player and is available as compiled SWF or you can download source code and then start modifying the video player based on your needs. The Strobe Media Playback is an only ActionScript an can directly loaded by the Flash Builder.

The UI of the Strobe Media Playback provide the basic functions to start/pause videos, toggle full screen, change volume and change position of video playback.

Basically, the Strobe Media Playback is an replacement of the old FLVPlayback of Flash, which provides the latest features of the Flash Media Server Product Family.

Adobe is working also on a HTML5 version of the Strobe Media Playback, which can used as fallback solution for iOS devices or devices without Flash Player for example.

The solution targets persons/developers who need a basic video player and maybe change the visual appearance of the player to their custom chrome of their website. The Strobe Media Playback can also be used as an starting point for developement of your own video player be extending the Strobe with your logic.

Flash Media Playback

The Flash Media Playback is a hosted version of the Strobe Media Playback which will provided by Adobe . The Media Playback will be integrated into your website by copying and pasting the an Embed Code into your site. Adobe provides a configurator, which allows the creation of the Embed Code. This solution targets persons or organisation, who can’t/won’t develop or host their own video player, but need a video player to publish their video content.

Flash applications for the Apple iPhone

Tuesday, October 6th, 2009

Adobe announced Flash applications for the iPhone at the keynote of Adobe Max 2009. With the upcoming version of Flash Professional (CS5), Adobe provides the possiblity to export Flash applications as native iPhone applications. Flash CS5 converts the ActionScript3 projects and creates ipa files, which can submitted to Apple iPhone AppStore. Six Flash based samples apps are already available at the AppStore, more details can found here. So, this solution let you build iPhone application with your existing skills and tool set, no Xcode or Objective-C needed.

Furthermore, their is no Flash Plugin for the Browser Safari available.  Since yesterday, Adobe had also set up a new website, when you try to install Flash player on the iPhone. Adobe get it to the point why it’s not available 😉 Check out the link.

This is the MystHackers video from the Adobe Max Keynote with Kevin Lynch (CTO) and Johnny Loiacono (SVP Creative Suite Unit) test possiblities how to get Flash on the iPhone.

An other interesting fact about this soultion is that you need no Mac computer anymore to build iPhone applicatons.

More information about Flash apps for iPhone can founded on:

Adobe Labs
Adobe DevNet Article
Adobe TV

Actionscript3 based Google Analytics Solution for Flash and Flex

Thursday, June 11th, 2009

If you wanted to track a Flash or Flex based application with  Google Analytics, you had to use the ExternalInterface to call the function of the JavaScript library. While search for a solution which isn’t using JavaScript, I found out that Google now provides some ActionScript3 libraries for Google Analytics.

You can find the documentation here and the libraries here.

The nice thing about the library is that you have the choice whether you want to use a ActionScript-Only solution or combine JavaScript and ActionScript. The only difference between both solutions is one parameter when calling of constructor of the tracker.

Next Flex Builder renamed to Flash Builder

Saturday, May 16th, 2009

Yesterday Ted Patrick officially announced that the upcoming version of Flex Builder will renamed to Flash Builder via Twitter. The last months Adobe forced to speak about the Flash Platform, the new interaction design tool for Flex application was called Flash Catalyst and now the next foreseeable step comes: Flex Builder becomes Flash Builder.

I’m not really sure, what I should think about the hole renaming. From the stand point of Product Marketing, it’s clear. The end result of all IDEs is a SWF running in the Flash Player. In the entreprise world, Flash has no good reputation. This is cause the millions of bad animations and ad banner produced with Flash in the last years. I don’t think the renaming of the product makes it easier to convince decision maker to use Flex for their applications. If Flash hadn’t this negative connotation this renaming wouldn’t be as critical as it is. It looks like we must start talking about the Flex Framework instead of Flex.

More information about the renaming can found on the blogs of the Adobe evangelists: Duane Nickull, Lee Brimelow and Serge Jespers.

PS: Ted Patrick, who announced the renaming changed the name of his blog from “Ted on Flex” ( to “Ted on Flash” ( about 3 months ago.

PSS: SAP calls it Flex based solutions also Flash Islands and not Flex Islands.

PureMVC Skeleton for Flash Media Server Applications

Tuesday, March 3rd, 2009

While searching for some Flash Media Server informations, I found a PureMVC Skeleton for Flash Media Server Applications on Stefan Richter’s Website. The skeleton provides the logic for the connection to Flash Media Server, but not any implementation of a video player.  I will use the skeleton in a video portal project, which I’m planning for a customer at the moment. Nice stuff.

Text Layout Component für Flash und Flex

Tuesday, December 16th, 2008

Wer sich schon mal versucht hat einen Editor zuschreiben, der mehr als die Standardfunktionen des Flex TextEditor unterstützt wird feststellen, dass nicht ohne weiteres möglich. Insbesondere die Erstellung von Texteditoren, die mehr Formattierungen unterstützen als das was htmlText zulässt ist nicht wirklich schön.

Abhilfe leistet die Text Layout Component für Flex und Flash, welche Dank der neuen Text Features im Flash Player 10 neue Möglichkeiten bietet. Will man die Text Layout Compoment bereits jetzt nutzen, dann kann entweder ein Plugin für Flash CS4 installieren oder eine reine Actionscript basteln. In Flex 3.2 lässt sich nur ein Subset per Actionscript Programmierung nutzen. In der kommenden Version 4 von Flex (Codename: Gumbo) ist die Text Layout Component bereits integriert, so dass man alle Features nutzen kann.

Link zur Text Layout Component auf Adobe Labs