flashTitle: Including Flash for Titles
To compensate for the inability of browsers to include fonts into web-pages, Adobe's Flash can be used to make adaptable typographic titles. But when including flash in a page, it can be a challenge to account for the availability of the plugin and the differences between browsers.
This Classbehaviour example offers an easy and consistent way of including flash.
Flash Title Replacement
The following title uses a non-standard font and a flash plugin is used to display it correctly. For practical use the title's plain text alternative is imported into the Flash file using action-script.
Title with a Non-standard Font
When flash or javascript is unavailable to the browser, the text with the "flashAlternative" class is displayed as an alternative.
Sending Commands to a Flash Plugin
The second example shows an extra function available to pass parameters to an included flash file. The URL of a sound-file is passed to a simple sound player, which loads and plays it at a press of the button.
Required Files
-
jQuery Addon Script: jquery.classbehaviours.flashtitle.js
- Prerequisite Script: jquery.classbehaviours.js
- Optional Script: AC_RunActiveContent.js (© Adobe)
- Example Markup: flashTitle.html
- Example XML: flashTitle.xml
- Example Flash: flashTitle.fla
- Example Flash: playSound.fla
Comments on this Article