Posts tagged "Mobile"

Optimizing network interaction in mobile applications

Optimizing Performance for the Flash Platform is filled with tips to make faster, more efficient Flash Player and AIR applications for desktop, mobile, and TV devices.

The chapter called Optimizing network interaction has some tips worth reviewing:

  • Use smart seeking.  Smart seeking improves performance when a user seeks to a new destination in a streaming video. Use Netstream.inBufferSeek.  (Adobe Flash Media Server 3.5.3 or greater required)
  • Divide your app into multiple SWF files. Multiple smaller SWF files means your content loads faster, especially on mobile devices with limited access to the network.
  • Provide event handlers and error messages for IO errors. Because network access can be less reliable on a mobile device, be sure to catch every IO error and keep the user informed.
  • Use Flash Remoting and AMF for optimized client-server data communication. As a binary format, Action Message Format (AMF) reduces the size of the data, improving the speed of transmission. Flash Remoting gateways, such as  ZendAMF, FluorineFX, WebORB, and BlazeDS, know how to handle the AMF format on behalf of the server side.
  • Cache assets locally after loading them. Avoid unnecessary loads from the network by saving files to the local file system, by using SharedObjects, or by saving data to a local database.

For more details on these tips, and other topics such as conserving memory and improving rendering performance, visit Optimizing Performance for the Flash Platform.

Jackie Levy, Content and Community Lead

Optimizing Flash and AIR applications for mobile

Looking for ways to build incredibly speedy Flash or AIR applications for mobile devices? If so, look no further than Optimizing Performance for the Flash Platform. Released last year, this guide is brimming with valuable tidbits, provided in part by Adobe’s own Thibault Imbert. It offers tips for optimizing performance on mobile devices, desktops and TVs, ranging from basic ActionScript best practices to sophisticated graphics rendering techniques.

Here are a couple of simple ActionScript optimizations from the Miscellaneous optimizations section of the ActionScript 3.0 performance chapter.

Avoid evaluating statements in loops
Another optimization can be achieved by not evaluating a statement inside a loop. The following code iterates over an array, but is not optimized because the array length is evaluated for each iteration:

for (var i:int = 0; i< myArray.length; i++)

It is better to store the value and reuse it:

var lng:int = myArray.length;
for (var i:int = 0; i< lng; i++)

Use reverse order for while loops
A while loop in reverse order is faster than a forward loop:

var i:int = myArray.length;
while (--i > -1)

These tips provide a few ways to optimize ActionScript, showing how a single line of code can affect performance and memory. Many other ActionScript optimizations are possible. For more information,

Test your Flash Platform Android apps now, without a phone

Writing Flash Platform applications for Android, or designing Flash content for mobile users and want to see the content emulated on specific mobile devices? Adobe Device Central CS5 has profiles for many mobile devices so you can test your applications without owning the device.

Since Adobe just released the official Motorola Droid X profile for Android, you can test your Android 2.2 (aka “Froyo”) apps and sites now and get the phone later.

To test apps In Flash Professional CS5

With your FLA file open, select Control > Test Movie > in Device Central. Select the device you want in the Test Devices panel. The application appears in the emulator:


To get new devices

In Device Central, click Browse and then search for a keyword, like “Droid” to see what’s available:


Click and drag new profiles, like the Motorola Droid or Motorola Droid X, to your list of Test Devices.

If you don’t see the profile you want, come back soon; the community is posting new profiles daily and Adobe posts official profiles as they are finalized.

To get back to the list of devices at any time

Click Browse and the Home button:


Click Emulate Flash to get back to testing in the emulator

To test mobile-specific features, like the Accelerometer

If a phone’s profile supports accelerometer or other mobile features, you can test them in Device Central. The Accelerometer panel lets you simulate moving the device in three
dimensions. Alt+Click simulates multiple finger touches and the Multitouch panel lets you set touch size and pressure. The Geolocation panel lets you test GPS features, and other panels
provide even more information:


Device Central works with Dreamweaver and several other Adobe products. Test your entire Flash-enabled Web site for mobile browsing using Device Central (including HTML5 sites).

Related links:

Sweet video description of organizing classes, implementing mobile feature APIs and using Device Central by Adobe’s Mark Doherty:

Device Central Support page:

Twitter updates for Device Central profiles:

Dreamweaver HTML5 Pack extension:

Dreamwever testing mobile content in Device Central Adobe TV page:

Using Device Anywhere (an alternative to Device Central) for testing: