Saturday, October 29, 2005

Blog Shift

I've moved my blog over to WordPress... Why? Because it's a really, really nice blog system that runs from my own server.

This blogger powered site will remain in place, in the unlikely event that anyone is permalinking to one of my posts...

Find the new blog here.

Friday, October 14, 2005

Accessibility notes - Screen readers and Flash

While recently working on some flash content which required DDA compliant accessibility I realised that the design of a flash project is radically affected when allowing screen reader and keyboard accessibility.

Of course accessibilty and DDA requires a certain amount of forethought before visual and animation design are finalised. Some basic rules should be followed...

  • Animation must not loop
  • Animation must be able to be paused if it runs for more than a "moment" (use your own discretion here, be aware that corporate usability departments will pass back the work if you have under estimated this timing, always err on the side of caution.
  • Animations that move through various steps should have controls to navigate forwards and backwards, unless there is a specific reason to only allow the user to move forward, for example in a quiz.
  • There will be specific guidelines for any client organisation, make sure you follow them to the letter.
  • Macromedia provides a thorough set of guidelines here, however I will cover some of the more practical aspects of Flash accessibility below.

As you can see these points need to be considered top-down, and therefore must be built into the design right from the brief onwards, since I'm writing this from the perspective of a Flash developer these points should already have been addressed.

Specific problems with accessibility in Flash

Tab Order - I've found that on occasion the Tab order of your accessible objects can be disregarded for unknown reasons. In most cases when applying accessibility to objects setting the tab order with the Accessibility tool is more likely to work than applying tab order with the _accProps properties.

Design - When creating a flash project it is likely that you will have varying depths of MovieClips, while this is standard practice it can also play havoc with screenreader and tab order accessibility. The advantages of creating a Flash movie in this way far outweigh the alternative of keeping all clips on the _root timeline.

So as a compromise it is often far easier to remove all accessibilty from visual objects and to use invisible proxy objects to provide an accessible interface.

These can more easily be updated for accessibility use and can simply have screenreader text attached to them as their _accProps.name or _accProps.description.

I have found that this method although far from what I would consider "elegant" it is workable and avoids problems with timeline depths and tab order.

I should say that there is no easy solution when it comes to adding accessibility to flash, the MM guidelines are useful, but in a few cases the features don't work as described, often due to browser inconsistency as opposed to the FlashPlayer having faults.

Tab order in Internet Explorer for instance is the strongest I've come across so far, tabbing through from the address bar to the flash movie on a page works just as you'd expect it to, however Firefox seems to require that you give focus to the flash object on the page before the tab order applies to it.

When it comes to scripting accessibility updates to the movie, always ensure that all your accessible objects are refreshed together (using the Accessibility.update, don't rely on on-stage text objects to be read by screenreaders, apply the text to the button object within tab order and thereby allowing a user to hear text that applies to that order of the screen when they select a button. Obviously you will need to exercise judgment when applying these rules, a button which does nothing but read some relevant text before a set of buttons which just call out their functions is far more helpful that verbose descriptions attached to each button.

The key thing to remember is that you should think of accessibility as an invisible and entirely separate control layer, also don't forget that "attractive" yellow tab highlights will appear over these invisible control objects when they are selected (with accessibility controls) so they will need to be placed as carefully as your visual controls, they must also be used to capture mouse events so in effect they will be the event communication to your visible elements.

Wednesday, October 12, 2005

AllofMP3.com gets a major update....

No doubt you've visited the AllOfMp3.com website once or twice, for those that haven't it's a huge online music store hosted in Russia, it's arguable legality (apparently it follows Russian copyright law as far as their blurb states) has often made this site a talking point in various music and P2P conversations.

Anyway, regardless of your stand on music piracy, and whether buying your music in Russia could possibly be construed as piracy(?) I'm not the person to answer that question... Well maybe I have an opionion of some sort?

I certainly think there are some criminal elements involved in music sales today, for instance selling tracks without the overheads of physical distribution, and limiting the number of devices these tracks can be played on, and then charging about the same (and more in some cases!) as a physical product does seem to be a criminal activity, I'm not sure it's got a strict criminal definition, profiteering? Surely that's not a crime!? Still as long as the mainstream market bears these disturbing and unfair practices then they will surely continue...

Still that's not what I want to post here today, and I do try hard to keep my opinions to myself on this blog, still... maybe that will begin to change..?

I digress, the main reason for this post is to tell you (the very persistent reader, if you've made it down here!) That the AllOfMp3.com site has had an impressive makeover recently.

A month or two ago there was a simple cosmetic overhaul to make the site look more slick and presentable, this included a simple Flash animation on the homepage showing new featured additions to the store.

In the last week or so though the store code appears to have been updated, restructuring the listings pages and cleaning up many of the layouts.

All in all the site is now much stronger and is almost as simple to use as iTunes.

The only thing they need to do now is revamp their desktop app, the AllOfMp3 Explorer and they'll be gunning for a top spot alongside iTunes..

So I really hope that there is no legal problems to speak of...

If you have ever been fined for bringing home a CD you bought on holiday (quite legally of course!) I'd really love to know about it, but isn't this the reason we have an open global market?

Don't go telling me that was just a complicated ploy to get cheap third world labour?!

Wednesday, September 21, 2005

Actionscript 2.0 for Flash 8 Language Ref

Just a quick post to let people know that there's a full language ref for Flash 8 / Actionscript 2.0 online at http://www.asdocs.com/

Very handy...!

Sunday, September 18, 2005

Beatport

Not often I get to combine two great passions in one go, but thankfully beatport has arrived and it's the kind of music site I've been waiting for...

Beatport specialises in new dance music, the kind of thing you won't find in iTunes and is also sporting a seriously good flash based interface.

Pricing is a little high per track, at up to $2.49 a track (MP3) but it's got a great preview system (being flash based) and it one of the nicest flash sites I've seen so far, even if I'm not completely sold on the lime green colour scheme...

This is how RIA's should be done as far as I'm concerened.

Go check it out...

Wednesday, August 24, 2005

TimeOut class

Some time ago I created a TimeOut class which used flash's setInterval command, I've become less and less pleased with the way setInterval works, specifically in tracking interval ID's and so on.

Since they are difficult to track I've decided to use a different method using a temporary MovieClip instance instead, this isn't ideal either, but keeping tabs on a MovieClip is a lot simpler and more reliable.

I'd be interested to hear how other people have dealt with the problem, in most cases I keep things in a sequence or use an event dispatcher so that timeout's aren't required, but sometimes I just need to use one, usually when I'm being lazy.

Anyway, here's the code...

/*
Class: TimeOut

Description:
A TimeOut class which uses a temporary MovieClip to perform timing,
as opposed to setInterval which is messy.

Usage:
:myTimer = new TimeOut(_root:MovieClip, 10:Number, this:Object, myFunction:Function, arguments:Array);

Version:
24-08-2005

Author:
Jason Milkins | jason@mentalaxis.com | 
*/
class TimeOut
{
 /*
 Property: exFunction

 Description:
 Callback function

 Datatype:
 Function

 Access:
 [Private]

 */
 private var exFunction : Function;
 /*
 Property: exObj

 Description:
 Callback object

 Datatype:
 Object

 Access:
 [Private]

 */
 private var exObj : Object;
 /*
 Property: exArgs

 Description:
 Arguments to be sent to the callback function

 Datatype:
 Array

 Access:
 [Private]

 */
 private var exArgs : Array;
 /*
 Property: inTime

 Description:
 Calculated running time of the TimeOut instance

 Datatype:
 Number

 Access:
 [Private]

 */
 private var inTime : Number;
 /*
 Property: timerEngine

 Description:
 Temporary movieclip created to run the timer

 Datatype:
 MovieClip

 Access:
 [Private]

 */
 private var timerEngine : MovieClip;
 /*
 Property: startTime

 Description:
 Calculated start time of the class instance

 Datatype:
 Number

 Access:
 [Private]

 */
 private var startTime : Number;
 /*
 Property: endTime

 Description:
 Calculated end time of the class instance

 Datatype:
 Number

 Access:
 [Private]

 */
 private var endTime : Number;
 /*
 Function: onTimeOut

 Description:
 The onTimeOut function runs the function supplied to the TimeOut instance, and then cleans up the timerEngine.

 Access:
 [Private]

 */
 private function onTimeOut ()
 {
  exFunction.apply (exObj, exArgs);
  timerEngine.onEnterFrame = null;
  timerEngine.removeMovieClip ();
  timerEngine = null;
 }
 /*
 Function: TimeOut

 Description:
 Setup the timer and provide the callback object, function and arguments.

 Access:
 [Public]

 Parameters:
 inClip - [MovieClip] Timeline clip to attach the timer engine.
 inSeconds - [Number] Number of seconds to wait before timeout
 inObj - [Object] callback object
 inFunction - [Function] callback function on object
 args - [Array] arguments to pass to the callback function

 */
 public function TimeOut (inClip : MovieClip, inSeconds : Number, inObj : Object, inFunction : Function, args : Array)
 {
  exObj = inObj;
  exFunction = inFunction;
  exArgs = args;
  inTime = inSeconds * 1000;
  startTime = getTimer ();
  endTime = startTime + inTime;
  //
  var _instance = this;
  //
  timerEngine = inClip.createEmptyMovieClip ("timerEngine" + getTimer () , 1600);
  //
  timerEngine.onEnterFrame = function ()
  {
   if (getTimer () >= _instance.endTime)
   {
    _instance.onTimeOut ();
   }
  }
 }
}

SonyPSP Site...

The Sony PSP site is due to be going live next Thursday...

As a matter of fact, the Australia and NewZealand site seems to be up and running already so you can have a quick look.

Follow this link....

I posted up a few details about the site a few weeks ago here.

as2ndac - .NET C# version

I'm in the process of rewriting the NaturalDocs AutoCommenting script in C# using the .NET framework.

This gives me a chance to learn more about writing Windows applications and getting to grips with .NET. It also gives me a chance to expand the design of the AutoCommentor, which, in it's Perl form, is a bit of a hack rather than something well designed.

All the extended features of this version will probably make their way back to the perl script eventually, but the chances of a Perl/Tk version are pretty thin, it's more likely the C# version will get wrapped in the GTK library, when I get around to it.

The new features are pretty much as per the original list...

  • Block or Line comment styles
  • Load/Save config files
  • Process folders
  • Process Multiple Files
  • Recurse folders
  • Default desription, version & author
  • Custom Headings
  • Selective Commenting

Monday, August 08, 2005

Studio 8 - Announced

Very exciting day today, Macromedia Studio 8 has been announced finally.

I'll be posting up some examples to add to the flood that have been put online over the last couple of weeks

Take a look at what macromedia are saying about it...

AS2.0 AutoComment for NaturalDocs - Beta release

Click here to download the beta release of AS2.0 NaturalDocs Auto Commentor

as2ndautocomment

Full information is available here...

By the way if you can think of a better, shorter name for this tool (that's still somewhat descriptive, drop a comment...

Ingredients for self compiling SEPY

If you are a SEPY user interested in getting the source code it can prove to be a little bit tricky, I've kept a guide for compiling SEPY from CVS on the Sephiroth.it forums up-to-date for a few months, I've decided to write these instructions up here, so there's more than one place to find them.

The instructions for compiling SEPY and getting the source from CVS, which Alessandro posted originally are out of date, and I posted the updates whenever I tried to download a significant new version and create a new source tree, third party python modules are sometimes added or updated and these are often used without notice, it's up to you to make sure these are current.

Note: These instructions are Win32/XP/2000 specific.

Get Python and modules required for SEPY

The Python binaries and modules you need to compile SEPY are as follows... (current as of 8/8/2005)

(Note: Always download the latest win32 binaries of each and install before compiling Sepy.)

python 2.4
http://www.python.org

wxPython 2.6
http://www.wxpython.org/download.php

pysqlite2
http://initd.org/tracker/pysqlite

pyRXP (xml library)
http://www.reportlab.org/pyrxp.html

pyXML
http://pyxml.sourceforge.net/

pyWin32
http://starship.python.net/crew/mhammond/win32/Downloads.html

py2exe (for build binary exe)
http://starship.python.net/crew/theller/py2exe/

4suite (utilities module)
http://4suite.org/index.xhtml

psyco (optimisation module)
http://psyco.sourceforge.net/

How to get the latest SE|PY source code via CVS.

If you know you have CVS installed on your machine, create a folder called c:\SEPYCVS and open a cmd window and type (from the C:\SEPYCVS folder)

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sepy co .

Note: The . at the end is important!

This will get you the complete current source tree.

Note: If you don't have a command line CVS client on your machine, get CVSNT ( http://www.cvsnt.org/ )

If you prefer to use a GUI CVS client Tortoise CVS is a good choice http://www.tortoisecvs.org/

TortoiseCVS Instructions

Install TortoiseCVS and restart the PC...

To checkout SEPY to your drive

  1. Create a new folder on C:\ called SEPYCVS (c:\SEPYCVS)
  2. Right click on the folder, tortoise will have given you some new options on the context menu.
  3. Select "CVS Checkout..."
  4. Enter the following into the TortoiseCVS CVSROOT entry...
     :pserver:anonymous@cvs.sourceforge.net:/cvsroot/sepy 
    (This will fill-in most of the fields on the TortoiseCVS dialog for you.)
  5. Enter a
     . 
    (full-stop / period) into the Module entry
  6. Click OK.

Tortoise will now download the latest source tree of SEPY for you. You'll find the SEPY source code in the C:\SEPYCVS\sciTE folder

You can run SEPY from the source directly:

Open a cmd window and from the c:\SEPYCVS\SciTE\ folder type

 python main.pyw 

This will run SEPY direct from python...

If you would like to build an exe from the source type...

 make_wx25_py053.bat 

You may get an error running make_wx25_py053.bat if so it's just that it is expecting a folder to be available, so if this is your first checkout of SEPY you need to create the folder... C:\SEPYCVS\bin_2.5\main

So from the C:\SEPYCVS folder...

 
 md bin_2.5
 cd bin_2.5
 md main
 cd \SEPYCVS\scite

And then try running make_wx25_py053.bat again.

If all goes to plan you will have a SEPY.exe file in the C:\SEPYCVS\bin_2.5\main folder which you can now run...