Using Flash Objects (SWF) in Compiled Publications

Applies to HTML Viewer, IE Browser publications

Adobe Flash® is a file format used for rich Web content over the Internet using Adobe® Flash Player. IE Browser and HTML Viewer publications can display Flash content (in SWF format) provided that the Adobe® Flash Player is installed.

Some Flash files may require external files (like images, XML files...) in order to work:

imgIE publications can detect which additional files may be required by your Flash movies automatically provided that their extension is available in the Special Content list. For instance, if you have a Flash movie that loads external JPEG files, you have to check that the .JPG extension is in the Special Content list or use the Dependencies feature, as shown in the example below.

imgFor HTML Viewer publications, you must use the Dependencies feature. See the dedicated topic in the Main Demonstration (example + screencast tutorial).

img See also Playing Flash video (FLV) in publications and Playing MP3 with Flash.

Working Example in IE publications

imgThis Flash movie (carousel3.swf) loads its data from an XML file called "icons.xml". The XML extension is by default in the Special Content list so the Flash movie is able to load the XML file without any problem. However, this XML file contains references to additional PNG files (icon1.png, icon2.png, icon3.png and icon4.png). The PNG extension is not listed in the Special Content list; therefore these iconN.png files won't be extracted and the Flash movie will fail. Two solutions: you can add ".PNG" to the Special Content list (not recommended because this would cause any PNG file of your publication to be unpacked to the hard disk) or you can use Dependencies.

For this example, we have selected this page in the File Manager and in the File Properties window, we have added the four iconN.png files as dependencies of the page:

img

When the page is loaded, the required iconN.png files are made available and the Flash movie can load them too.

imgHTML syntax for the Flash movie:

<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="640" height="480" id="myMovieName" data="carousel3.swf"><param name="movie" value="carousel3.swf" />
<param name="quality" value="High" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
</object>

Flash movie sample by Lee Brimelow from http://www.gotoandlearn.com

Working Examples in HTML Viewer publications

imgSee the dedicated topic in the Main Demonstration.

img See also  Special Content list and Dependencies.


About

This is the online documentation of HTML Executable.

About HTML Executable

HTML Executable is a versatile HTML compiler and ebook compiler: it lets you create secure ebooks and desktop applications with your websites, HTML or PDF documents.

You can easily create attractive ebooks, full-featured HTML applications (RIA) and software, digital publications from your websites, PDF files and HTML documents for online or offline distribution.

Learn more - Free Trial