Global IP Address:

54.81.108.205

Your Local IP Address:

Determining Local IP address....

*If you are behind a firewall (NAT) your global and local IP addresses will differ. Learn More

Home > Articles > Add Flash Header to WordPress Atahualpa Theme (ver 3.5.3)

Add Flash Header to WordPress Atahualpa Theme (ver 3.5.3)

September 16th, 2010 reset

Since first publishing ‘Add a Flash Header to WordPress Atahualpa Theme‘, many users have found this to be a great solution to using an Adobe Flash movie (.swf) in the header area of Atahualpa theme on WordPress. This was tested on WordPress version 3.0.1 and the Atahualpa Theme latest release is 3.5.3.

Both the Static Publishing and the Dynamic Publishing method have been updated, so you can choose which best fits your needs. The Static Publishing method uses the industry best practice of nested-object tags with conditional expressions. The Dynamic Publishing method uses swfObject2.2 to insert the flash movie dynamically using javascript. Google has some great information on swfObject and various methods of implementation.

Functionality has also been added to the  %flash[....] parameters specified in the Atahualpa Theme Options in the WordPress Dashboard. You can now supply three (3) additional (and also optional) parameters, flashvars, param values,attribute values.

  • Flashvars allow you to pass information to your flash movie.
  • Param values allow you to specify specific Flash parameters to the browser to change how the Flash object behaves (ie: menu=false, wmode=transparent, allowScriptAccess=always are examples of parameters).
  • Attributes allow you to specify additional HTML attributes for the < object > tag, such as id=ata_flash_header.

The syntax for the %flash[......] header item in Atahualpa Theme Header Options is:

%flash[ swf filename, width, height, flashvars, param, attributes]

swf filename: is required and is the movie filename (.swf). This can be a full URL, but if just filename, file is expected to be in theme’s /images/header folder.
width: is required and is the width (in pixels) of the movie. You can optionally append ‘px’, as in 1220px.
height: is required and is the height (in pixels) of the movie. You can optionally append ‘px’, as in 200px.
flashvars: are optional and is simply a series of assignment statements separated by semi-colon (;). As in site=production;x=5. You header would use variables site & x in it’s actionscript and these variables will be initialized with values stated when the flash movie begins.
param: are optional parameters for Flash Plug-in that control specific Flash behavior such as menu and wmode (window-mode). For example, menu=false;wmode=transparent for param would allow the flash movie to be transparent and show reduced context (right-click) menu.
attributes: are optional attributes that are added to the HTML object tag. Typically this is the ID of the element, as in id=ata_flash_header.

Here is a real example:

%flash[header.swf, 1220px, 200px, site=production, menu=false;wmode=transparent, id=ata_flash_header]

Note: the use of comma (,) to separate the major items and semi-colon (;) separate multiple values within an item. always double-check your syntax, I usually start with the required parameters and then get page rendering correctly and then add items to fine tune behavior.

You can supply ‘null’ in lieu of a optional parameter. For example if you had no flashvars, but needed to specify param & attributes. Do this %flash[header.swf, 1220px, 200px, null, menu=false, id=ata_flash_header].

Make sure you specify your Header image height in the WordPress Dashboard Atahualpa Theme Options and supply a default image to be used as alternate content if Flash is not available in the users browser. Alternate content (the header image) will be displayed as a fall-back. You should test this option by disabling your flash plug-in in your browser.  For some more information, see previous mydeviceIP.com posts that discuss these principles in detail.

Here is Zip file for STATIC Publishing method. Replace the bfa_header_config.php in your Theme’s functions folder. (good idea to rename original or keep back-up). I usually rename the original file to bfa_header_config-ORIG.php.

Here is Zip file for DYNAMIC Publishing method. This method requires swfObject.js in your root WordPress folder. You can get swfObject.js at google code.

If you experience any problems with this latest version of the ‘Add Flash Header to WordPress Atahualpa Theme’, please leave a comment and we will try to investigate it.

Comments are closed.