Month: July 2006

reading list

Commenced creation of my reading list of books and online references I have found useful. Initially concentrating on the Flash and ActionScript books I used to get involved in this technology.

Posted by creacog in ActionScript, Flash Platform, User Groups, 0 comments

mac flash switch

I recently had the need to be able to switch player versions on the mac, and was very grateful to have found Mike Chambers‘ “Flash Player Switching on Mac” entry. Following the instructions in that entry may well be all you need. Be sure to read comments IV and V – they are important!

In my own set up I made a couple minor alterations to ease things in my own mind (to be read in conjunction with Mike’s article)…

  1. With respect to setting up the ‘soft-link’ or alias to “Internet Plug-Ins” I find an alias name of “InternetPlug-Ins” less likely to cause confusion than the more generic “plugins”. (Norton utils for example creates a “Plug-ins” folder within /Library)
  2. Similarly to avoid any confusion within the InternetPlug-Ins folder which in my case contains loads of files, I created a sub-folder “flashplayers” into which I placed the version folders.

So my resulting folder/file structure is as follows…

/Library/InternetPlug-Ins/
  Flash Player Enabler.plugin
  Flash Player.plugin
  flashplayer.xpt
/Library/InternetPlug-Ins/flashplayers/7
  Flash Player Enabler.plugin
  Flash Player.plugin
  flashplayer.xpt
/Library/InternetPlug-Ins/flashplayers/8
  Flash Player Enabler.plugin
  Flash Player.plugin
  flashplayer.xpt
/Library/InternetPlug-Ins/flashplayers/9
  Flash Player Enabler.plugin
  Flash Player.plugin
  flashplayer.xpt

The idea being that the three files currently in /Library/InternetPlug-Ins represent the currently active version of the player.

As my folder structure is different to that of Mike’s, my script is slightly modified…

#!/bin/bash
#
# Script to change the flash player
#
if [ $# != 1 ]; then
  echo "Usage: $0 name-of-player-version-dir"
  exit
else
  plugin_dir='/Library/InternetPlug-Ins'
  np_dir="$plugin_dir/flashplayers/$1"
  if [ ! -d $np_dir ]; then
    echo "$np_dir does not exist."
    exit
  fi
  cp -rv $np_dir/* $plugin_dir/
fi

Finally if you are not familiar with writing and running scripts via the terminal, two things to bear in mind…

  1. Placing your script file in a folder picked up by the path, will ensure it is available to you whatever is your current working directory. In my case I use the default tcsh shell and cfp is placed in my /Users/username/bin directory. This is added to the path in my via my .tcshrc file with the line
    setenv PATH "$PATH":bin
  2. Make sure you set the executable flag on the script file:
    chmod +x cfp
Posted by creacog in Flash Platform, Mac OS, 2 comments

round the corner

After years of dreading having to implement in xhtml/css, a designer’s efforts laced with rounded corners, I recently went and proposed a design of my own requiring them. (Doh!)

Over the last few years a number of tried tested techniques have been established…

I’ve never really been a fan of bitmap corners typically using variants of the long-standing “sliding doors” technique. However if there is a 3d aspect to the design this would probably be the best way.

In my case I just wanted a neat rounded corner between a foreground and background. I found that Nifty Corner Cube was just the job! Released March 2006 under GNU GPL License, the third evolution of Nifty Corners, these are really easy to implement in JavaScript and degrade gracefully. We are not limited two colours as a ‘transparent’ mode allows background gradients through. My only (limited) disappointment was the loss of the rounded border of previous version. However my final design can and will live without borders.

Posted by creacog in Javascript, XHTML/CSS, 0 comments

embedding flash in html page – best practice? (SWFObject)

For a long time I simply used the html published from the Flash IDE to embed a SWF. Expecting that to be the ‘best practice’ approach. Like others I was concerned at the impact of Microsoft’s upcoming changes to IE in response to EOLAS patent issues. I was dreading either having to write my own JavaSript or research countless approaches.

With SWFObject the problem is solved. It has been around for a long time (formerly known as FlashObject) and appears to be well tried and tested. I was really pleased with how simple it is to use, how it degrades gracefully. I’ve used this on a number of projects and now consider it to be best practice. In future I’d need a very good reason not to use it.

Update (14/03/2008): SWFObject 2 released

Posted by creacog in Flash Platform, Javascript, XHTML/CSS, 2 comments

make my h1 look nice

I’ve recently been distracted from my flash ambitions back to the world xhtm/css design. One of the issue with the organisation concerned is that in print media they use what I think is a really nice font: ITC Century Light. Ideally this is what should be used for all h1 headers through this site. Obviously not many users are likely to have this font installed. The substitute font is Times New Roman which is not nearly as neat, or distinctive.

In the bad-old days we would have created GIFs for each heading and used them instead. The height of bad-practice in this new world of standards compliance and accessibility.

Prior to doing any research, I had expected use of Flash would fall foul of similar problems. Then I found sIFR. A combination of JavaScript, CSS and Flash, which at run-time replaces designated tags with a SWF containing the text rendered in your font of choice to the same dimensions. What’s better it ticks most of the accessibility boxes. I’m really pleased with how easy this was to set up, and how it gracefully degrades.

Ok I came to this late. But the current version (2.02 at time of writing) has been recently updated with bug fixes and changes relating to ELOAS. And there is a version 3 in development.

This is a good piece of work by the developers, who are looking for funding. Certainly if my client goes with this recommendation, I’ll be sending a donation.

Posted by creacog in Accessibility, Flash Platform, Javascript, XHTML/CSS, 0 comments