Flash content

Flash and Flash Lite

Adobe Flash is a widely used authoring tool for the Internet and end-user environments. It is widely used to create interactive multimedia content in the form of SWF files which can played on the Adobe Flash Player. Flash Lite is a lightweight subset of the Flash Player that is designed for use on a mobile device. Flash Lite is optimized for devices with limited resources, such as smaller screens and limited processing power.

For information about:

Flash Lite content for the S60 Browser

Some examples of Flash content that works well on a mobile device are:
  • Non-interactive animations.

  • Simple interactive content, such as banner ads with links.

  • Streaming media applications with simple user interfaces.

If a feature in an SWF file is not supported by Flash Lite, the SWF file will play but the unsupported feature will be ignored. For best results on a mobile device, use content that is designed for Flash Lite.

Adding Flash content to a Web page

You embed Flash content (.swf files) into a Web page using the standard <object> and <embed> tags.

To add flash to a Web page

  1. Add the following code to your Web page:

    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="550" HEIGHT="400" id="myMovieName">
         <PARAM NAME=movie VALUE="myFlashMovie.swf">
         <PARAM NAME=quality VALUE=high>
         <PARAM NAME=bgcolor VALUE=#FFFFFF>
         <EMBED href="/support/flash/ts/documents/myFlashMovie.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400" NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
    </OBJECT>
  2. Replace myFlashMovie.swf with the name of your SWF file.

  3. Define the parameters to suit your needs. For information on Flash <object> and <embed> tag attributes, see the Adobe TechNote.

You can also use publish HTML code directly from the Adobe Flash IDE and add that to your Web page.

Detecting the Flash Player version

The S60 Browser supports the use of the SWFObject to detect the Flash Player version. You can then use this information to tailor your content to what is on the device.

To detect the Flash Player version

  1. Follow the instruction in the section Detecting Flash Player versions and embedding SWF with SWFObject2 in the Adobe Developer Connection to detect the Flash Player version.

  2. The returned value is based on the underlying Flash Player version, so you need to map it to the corresponding Flash Lite version. The following table shows the correct mapping. The first number in the returned value is the major version, while the second number is the minor version. For example, the major version number for Flash Lite 3.0 is 8 (Flash Player 8) and the minor version number is 1.

    Flash Lite version Returned value range Example value
    Flash Lite 3.1 FL 9,1,X,X FL 9,123,255
    Flash Lite 3.0 FL 8,1,X,X FL 8,1,56,0
    Flash Lite 2.1 FL 7,2,X,X FL 7,2,501,0
    Flash Lite 2.0 FL 7.1,X,X FL 7,1,501,0
    Flash Lite 1.1 FL 5,2,X,X FL 5,2, 12, 0
  3. Follow the instructions in the section Providing alternative content for SWF files in the Adobe Developer Connection if you want to tailor your content to the Flash Player version.

Interacting with Flash Lite in a Web Page

The S60 Browser supports interaction between Adobe ActionScript and JavaScript on devices that have Flash Lite 3.0 and later. This provides a way to pass ActionScript commands from the Flash content to the Web page and use JavaScript commands to access and control the Flash content. This includes operations such as registering for a callback from JavaScript to ActionScript and passing objects from ActionScript to JavaScript.

There are several way to pass commands between ActionScript and JavaScript:

The best way to communicate between ActionScript and JavaScript on the S60 Browser is via the ExternalInterface class. For an example of communication between JavaScript and the ActionScript, see An example of communication between JavaScript and Adobe Flash Player on the Adobe Developer Connection website.

Note: You should avoid embedded Flash content that involves keyboard focus, such as interactive elements. Running such content on non-touch devices may make it difficult for the mobile device user to leave the Flash content and return to the Web page. If you want to add interactive elements such as onscreen controls, they should be done using HTML and JavaScript. For example, you should define buttons such as play and pause using HTML and then use JavaScript to pass the play and pause commands to the Flash content.