Archive for the ‘ XHTML ’ Category

SWFObject

SWFObject, if you haven't heard of it already is a really great little javascript that simplifies the process of embedding your swf files in an html page. This is a huge improvement over the default systems provided Publishing from Flash or Dreamweaver.

The method provided by the Publish settings in Flash and Insert > Media > Flash in Dreamweaver work just fine, but they leave you with a huge Javascript mess in your HTML page. SWFObject provides a clean and organized system that works well and provides a few extra perks.

You can download SWFObject here: http://code.google.com/p/swfobject/

SWFObject is contained in a single small Javascript file. I have been using the latest version (at the time I wrote this it was 2.2) and it seems to work well.

You can write the code for yourself following the documentation on the site listed above. Or use the code generator here: http://www.bobbyvandersluis.com/swfobject/generator/index.html

I had some trouble getting Flash to display 100% width and height. But this was sorted after a short Google search. Turns out the following styles are required:

html, body {
 background-color: #616264;
 margin:0;
 height:100%;
 overflow: hidden;
}
#flashcontent {
 height:100%;
}

Note, without overflow:hidden you end up seeing the scroll bars and the page scrolls about 5px. This was very confusing, you would figure that 100% height would make everything the size of the browser rather than a little larger?

AC_RunActiveContent.js and Click to Activate

It seems like the AC_RunActiveContent.js will no longer be necessary. Looks like MS will be taking the "Click to Activate" requirement out of IE. read more Here.

Testing navigateToURL locally

I noticed that navigateToURL (this replaces getURL in AS2) doesn't seem to work locally, if you want to open a link in the same window (_self). I found this note on the Adobe site. It seems that you need to set "allowScriptAccess" to "always" in the HTML parameters. This needs to be set in both the param tags as below: <param name="allowScriptAccess" value="always" /> and in the embed tag: <embed allowScriptAccess="always" />

A great tutorial on making your own WordPress themes

Here's a great tutorial on making your own WordPress themes. Very detailed with a lot of good information.

so-you-want-to-create-wordpress-themes-huh

SWFObject

This is a great tool for embedding swf's into your HTML pages. This is an alternative to the markup provided by Adobe via Flash or Dreamweaver. It also circumvents the need to "Activate Flash" on Windows.

I prefer this over the default scripts which often cause problems with the HTML code on the page.

It provides a few extra features also. Like ability to get variables from the URL string for the current page. It can also check the Flash version and provide a link to get the current version of Flash.

http://blog.deconcept.com/swfobject/

Kimili Flash Plugin

Testing the Kimili Flash plugin for WordPress. It seems to be working pretty well so far.

Interesting to note that the plugin is supposed to work with Flash anywhere it appears. So you can use KimiliFlash to put Flash into your header or other areas of your site.

Another interesting item is that the Kimili plugin uses SWFObject: Javascript Flash Player detection and embed script which is XHTML valid. The default Flash HTML code written by Flash and Dreamweaver will not validate.

There is an article about this on A List Apart.

Flash Banner

I'm just beginning with WordPress. I thought I would attempt to add a Flash Banner to the page. After a few attempts this turned out to be not very difficult. The banner above with my name is made with Flash. I needed a test movie so I made a movie with the name as the only element. This worked pretty good.

Hopefully I will replace this banner with something more interesting in the near future.