SWFIR - great way to style images
JavaScript March 11th, 2007SWFIR (swf Image Replacement), it is a great way to add some style to images inside a web page escaping from the limitations imposed by the HTML but respecting the standard design concepts. This is done using JavaScript and Flash. Using swfir is simple and you don't need any advanced knowledge about Flash or JavaScript. Just download the swfir_v1.zip and unzip it, then upload the 2 files (swfir.js and swfir.swf) from it to the same directory in your website. To make it work all you need to do is include the JavaScript file and then to choose the images that will be styled and features applied to them.
The .js file need to be included in the "head" of the document:
-
<script type="text/javascript" src="swfir.js"></script>
I will use some styling features to the following image:
-
<img src="picture.jpg" alt="Here is some alt text" id="pic2" />
To call swfIR at work you have to use something like:
The code above need to be situated inside the "body" section. I used some parameters (there are more that can be used/tested) to style my "pic2" image.
The result is something like this:

It works fine in Firefox 2.0 and IE 6.0, unfortunately on some cumputers with SP2 failed to run in IE 6.0, nut sure why but you can write to the SWFIR team.
Recent Comments