Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Flash Developer Center /

Four steps to improving your Flash interface testing

by Kristopher Schultz

Kristopher Schultz
  • Lead Developer,
  • Resource Interactive

Created

4 October 2006

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Flash Professional testing

Requirements

User level

Intermediate

As the web begins to shift from the more traditional HTML interfaces most common today to using rich Internet application technologies such as Adobe Flash and Ajax, developers need to be aware of how the mechanics of these technologies impact the way dynamic interfaces should be tested. For example, one important distinction about Flash-based interfaces is that they change their appearance dynamically and often process user input locally in real time—a very different model from the server-centric "page" metaphor that traditional HTML interfaces utilize, which requires a trip back to the server for almost every user interaction. Another important difference is that Flash content is rendered by a common engine across all platforms and browsers. By contrast, the variety of web browsers render HTML content slightly differently across platforms.

Despite these differences, many people assume that testing a Flash-based interface is simply a matter of applying the same techniques and success criteria they are accustomed to doing for HTML interfaces. This often results in an interface that works exactly as expected during testing but exhibits buggy behavior when accessed by real-world users.

In this article, I present four practices that you should follow when testing a Flash-based interface and describe the issues that these practices are designed to expose. If you follow these practices faithfully, you will ensure solid, consistent performance of your Flash-based interfaces and better user experiences for your visitors.

Step 1: Test over multiple connection speeds

This step exposes the following:

  • Download performance problems
  • Streaming animation glitches
  • Code logic flaws, including:
    • Accessing dynamic data before it loads
    • Invoking methods on objects before they are initialized
    • Incorrect assumptions about a fixed execution order for asynchronous operations
    • Jumping to Timeline frames before they have loaded

Testing over multiple connection speeds is the most important practice to follow when testing Flash interfaces. It's also the one that traditional HTML developers are likely to dismiss. Testing HTML interfaces in this manner accomplishes primarily one purpose: confirming that download performance is acceptable for all users. With Flash, testing over various connection speeds reveals much more than just download performance problems.

If you test only from your local hard drive—or a web server on your local network—you are in danger of masking problems that might occur only under real-world connection conditions. When you test locally, things like server communication, image loading, and SWF streaming happen almost instantaneously. Under these conditions, it is easy to inadvertently write code that relies on this instant response time without realizing it.

An example helps illustrate this concept. If you use the statement gotoAndPlay(20) on the first frame of your movie's timeline, it will most likely work as expected when testing locally or even over broadband. However, if you test the same file over a modem connection, your movie will probably behave incorrectly. This is because the streaming nature of Flash content allows the code on frame 1 to run before the later frames of your timeline have finished loading. An attempt to send the playhead to a frame that hasn't loaded will fail.

One very helpful way around this problem is to make frequent use of the built-in Simulate Download feature in Flash, which you can find in the View menu of the SWF window that appears after choosing Control > Test Movie (see Figure 1). Because the Simulate Download feature allows you to preview the performance of your movie over various connection speeds, it is a good way to spot speed-related problems early.

Using the Simulate Download feature
Figure 1. Using the Simulate Download feature

But beware. The Simulate Download feature isn't perfect; you still need to test your movie over real connections of various speed. The most important thing to remember is that bugs related to connection speed are far easier to address if you find them early. The mantra "Test early, test often" is particularly relevant to this practice.

Step 2: Test across browsers

This step exposes the following:

  • Problems with embedding Flash Player
  • Problems with relative URLs
  • Problems with Flash-to-browser communication

Although cross-browser testing is essential with traditional HTML, the reasons for doing it with Flash content are very different. Cross-browser testing with HTML reveals page-display and client-side scripting problems. Because Flash Player handles both of these aspects for Flash-based interfaces, the browser has no influence over them.

The browser does, however, influence the way Flash content is embedded in the page. Different browsers require different HTML markup code in order to load and display Flash files. Additionally, the way Flash Player resolves relative URLs when attempting to load external assets like images and XML data—or when jumping to new web locations using getURL()—varies from browser to browser.

Testing across various browsers confirms that Flash content has been embedded properly on the page and that all URLs embedded in the Flash file are working consistently across all browsers. Of course, if your Flash interface communicates with the browser using JavaScript, cross-browser testing is also necessary to expose any differences between the way various browsers handle this form of communication.

Note: For tips avoiding relative URL problems, refer to the following Flash TechNote: Relative URLs are not referenced correctly in a Flash movie.

Step 3: Test across Flash Player versions

This step exposes the following:

  • Publishing mistakes
  • Flash detection problems

Because Flash Player handles nearly all aspects of the display and functionality of a Flash-based interface, you will need to test your interface in various versions of Flash Player. It is usually adequate to test in just two versions: the version of the player which you've defined as your minimum required version and the version of the player that preceded the required version.

For example, if your interface requires Flash Player 6, then you should test in the earliest release of that version (Flash Player 6r21) and in any release of the previous version (Flash Player 5r30). If your interface requires a specific later release of a particular version—for example, Flash Player 6r65—then you should still test in the versions mentioned previously as well as the required release.

In our example this would mean testing in Flash Player versions 5r30, 6r21, and 6r65. By testing across Flash Player versions, you will be able to expose any publishing mistakes (such as publishing for Flash 7 when you meant to publish for Flash 6), as well as any problems with any Flash Player detection functionality you may be using.

Note: You can find an archive of old player versions in the following Flash TechNote: Archived Flash players available for testing purposes.

Step 4: Test on "weak" machines

This step exposes the following:

  • Issues with playback performance
  • "This script appears to be running slowly" alerts

Displaying traditional HTML pages takes very little computer power. As a result, web developers have hardly ever had to consider how the power of the end user's computer influences the quality of the user's web experience. This is not the case with Flash content, which behaves much more like a CD-ROM or video game. The user's hardware—processor, RAM, and video card—impacts the experience significantly.

Much like CD-ROMs and video games, Flash-based interfaces should be designed with a specific minimum hardware requirement in mind. As you design and build your interface, repeatedly check the performance of your work on a machine that matches that minimum specification to ensure that you are not overtaxing the hardware with your graphics, animation, or coding choices.

Note: For lots of useful information on improving code and graphic performance, refer to the section "Optimizing FLA Files for SWF Output" in Jen deHaan's article, Flash 8 Best Practices. For detailed instructions on how to use Flash 8 bitmap caching to improve performance, refer to Guy Watson's Using Bitmap Caching in Flash.

Where to go from here

By following these four important testing practices, you will ensure that the Flash-based interfaces you build for yourself or your clients, and present to the world, provide the user experience that you originally intended.

For more information about Flash Player, visit the Flash Player Developer Center and read up on the latest about best practices, detection scripts, security, and more.

More Like This

  • Setting up a Flash project for local and network playback
  • Making Flash websites searchable
  • Preventing publishing problems in Flash
  • Writing and running functional tests for Flash with Selenium RC
  • Creating an accessible animated presentation in Flash
  • Google Analytics for simplified tracking of rich media websites
  • Flash CS4 Missing Manual excerpts: Video, testing and debugging, optimization, and sound
  • Code in Flex, test in Flash
  • Understanding ActionScript 3 debugging in Flash

Flash User Forum

More
04/23/2012 Auto-Save and Auto-Recovery
04/23/2012 Open hyperlinks in new window/tab/pop-up ?
04/21/2012 PNG transparencies glitched
04/01/2010 Workaround for JSFL shape selection bug?

Flash Cookbooks

More
02/13/2012 Randomize an array
02/11/2012 How to create a Facebook fan page with Flash
02/08/2012 Digital Clock
01/18/2012 Recording webcam video & audio in a flv file on local drive

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement