Refactoring Flash Embedding Methods

Refactoring Flash Embedding Methods

Ming Ying, James Miller
DOI: 10.4018/jssoe.2012070102
OnDemand:
(Individual Articles)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

Flash and Ajax are currently two popular Rich Internet Application (RIA) technologies, integrating Flash and Ajax will further enhance Internet users’ experiences. To communicate Flash written in ActionScript with Ajax written in JavaScript, the first step is to embed Flash content into a web page. Two methods can be used: markup-based Flash embedding methods and JavaScript-based Flash embedding methods. However, the drawbacks of markup-based Flash embedding methods make JavaScript-based Flash embedding methods a better solution. To automatically convert markup-based Flash embedding methods into a JavaScript-based method, this paper presents a refactoring tool, called FlashembedRT, to assist programmers with the transformation. This tool refactors the five different markup-based Flash embedding methods to the JavaScript-based Flash embedding method called flashembed.
Article Preview
Top

Introduction

With the advent of Rich Internet Application (RIA) technologies which are crucial to Web 2.0 sites, Internet users’ experiences have moved from the click-and-wait mode to a richer, faster and more interactive mode. Adobe Flash and Ajax (Asynchronous JavaScript and XML) are two popular RIA technologies. Adobe Flash is a multimedia platform for creating interactive and animated web sites (Ying & Miller, 2011). Flash games in Facebook1 are examples of Adobe Flash applications. Ajax, a set of web development technologies, is an alternative to Flash. Ajax makes web-based applications feel like desktop applications by only changing updated information without refreshing the entire page2 (Paulson, 2005).

Though both Flash and Ajax allow programmers to build dynamic websites, they have different focuses: Flash stresses on high-quality graphics and animations; it supports sound effects, video and audio playback and capture; whereas Ajax emphasizes actions on a website that involves the web server and the browser. Integrating Flash with Ajax to enhance the users’ experiences is highly popular. In practice, Flash is usually served as a partial substitution for the interface to provide many graphical tasks that cannot be accomplished by JavaScript. Currently, there are many innovative websites using Flash and Ajax technologies together, such as Google Finance3 and Yahoo Finance4.

Figure 1 shows the combined Ajax and Flash working model. Flash content is integrated into the user interface as a component. The Ajax engine runs within the browser to communicate, interact and display information between the server and the browser. If more data is requested from the Flash component, the Ajax engine sends an asynchronous request to the server to retrieve extra data for the Flash component to display without causing the entire web page to be refreshed.

Figure 1.

The combined ajax and flash working model

jssoe.2012070102.f01

Flash is written in ActionScript; whereas Ajax is written in JavaScript. To implement the integration of Flash and Ajax technologies, interaction between ActionScript and JavaScript follows two steps:

  • Embedding Flash content into a web page; and

  • Communicating between actionscript and javascript.

Flash can be embedded through markup-based embedding methods or javascript-based embedding methods5. Markup-based embedding methods use pure hypertext Markup Language (HTML) tags: <object> or <embed> to include Flash content, while javascript-based embedding methods utilize javascript to load Flash content. Flash embedding methods should meet the following criteria6 (Braunstein et al., 2007):

  • Cross-browser support: the method should have the ability to support all web browsers;

  • Standards compliance: the method should be in compliance with the World Wide Web Consortium (W3C) standards7;

  • Support for alternative content: alternative content should be supported. That is, the content should be accessible when no Flash Player is installed. This content can also be used for search engine indexing purposes;

  • Support for plug-in detection: The version of the Flash Player should be detected before Flash content is displayed. Mismatches between the Flash content and the Flash Player may result in errors or broken content.

Complete Article List

Search this Journal:
Reset
Volume 13: 1 Issue (2024): Forthcoming, Available for Pre-Order
Volume 12: 2 Issues (2022): 1 Released, 1 Forthcoming
Volume 11: 2 Issues (2021)
Volume 10: 2 Issues (2020)
Volume 9: 2 Issues (2019)
Volume 8: 4 Issues (2018)
Volume 7: 4 Issues (2017)
Volume 6: 4 Issues (2016)
Volume 5: 4 Issues (2015)
Volume 4: 4 Issues (2014)
Volume 3: 4 Issues (2012)
Volume 2: 4 Issues (2011)
Volume 1: 4 Issues (2010)
View Complete Journal Contents Listing