archive: May 2009


Flash Header Online

Posted by Shane

The very first draft of the flash header for this site is now online! If you do not have Flash 10 installed, it will ask you to download Flash 10 and install it.

If you don’t have flash at all, you will get the basic image version. I have yet to convert the static image to the same height. So you are wondering how I got this done? Well read on to find out!

Using a jQuery plugin called ” jQuery Flash” (url) I was able to use it to my advantages hooking into WordPress native jQuery support. I had to edit four files of mine with the addition of adding the flash files and the jQuery flash plugin file for this to work.

  • functions.php *
  • header.php *
  • js/jquery.common.js
  • js/jquery.flash.js
  • style.css *
  • Action Script 3.0

* Items marked with a “*” are native to most WordPress Themes.

First it came down to loading the jQuery.flash.js file inside the functions.php file.

function bugssite_default_scripts() {

$scripts->add( 'bugssite-default', get_bloginfo('template_directory'). '/js/jquery.common.js', array('jquery'), '20090505' );
$scripts->add( 'bugssite-flash', get_bloginfo('template_directory'). '/js/jquery.flash.js', array('jquery'), '20090505' );
$scripts->localize( 'bugssite-default', 'bugssitedefaultL10n', array(
'templateDirectory' => get_bloginfo("template_directory"),
) );

The header.php file was modified to load the new jQuery.flash.js script.

<?php wp_enqueue_script('bugssite-flash'); ?>

Comments 1

Commenting is now closed