Multimedia Development
Flash, Flex, AIR, ActionScript 3.0
Processing, OpenFrameworks
 


iPhone Style Password Fields in Flex

February 16th, 2010

You may be sick of hearing it, but Apple, and in particular their iPhone/Pod/Pad, are setting the standard for instinctive and usable interaction. And I’m sure the iPhone will influence the next generation of Flex components, but until then I’ve rolled one of my own.

My client was reporting the primary school children their app was aimed at were having trouble entering their (given) passwords, the logs showing some needing 20 or 30 tries. The iPhone way of entering passwords, showing the last letter typed, solves the issue of imprecise keying on a touchscreen. But it also serves as an accessible alternative for any user group who may need it.

I was going to post this as a Flash/Flex component, but it is so simple I may as well just post the code, then it is easily translatable into JavaScript, PHP, Processing or whatever is your flavour.

private var _passwordEntered:String = "";   
// this will store the password as it is typed

passwordTI.addEventListener(Event.CHANGE, passwordEntry);
// the TextInput component - make sure "displayAsPassword" is turned OFF

private function passwordEntry(e:Event):void {
 
    // update _passwordEntered with whatever has been typed
    var newText:String = passwordTI.text;
    if (newText.length < _passwordEntered.length) {
        _passwordEntered = _passwordEntered.substr(0, newText.length);
    } else if (newText.length > _passwordEntered.length) {
        var diff:int = newText.length - _passwordEntered.length;
        _passwordEntered += newText.substr(newText.length - diff, diff);
    }
      
    // hide the text in the field, apart from the last char
    passwordTI.text = "";
    for (var x:int = 0; x < _passwordEntered.length-1; x++) {  
        passwordTI.text += "•";
    }
    passwordTI.text += _passwordEntered.charAt(_passwordEntered.length-1);

}


Wii-Learning

December 3rd, 2007

If you’re in the mood for some outside the box thinking on interface design, how about putting a bit of physicality into your learning and controlling it with a Wii remote?

Already you can run Flash content on the Wii, and control it with the remote. But now there are third party apps for reading data from the Wii-mote on a Mac or PC.

Lets just ignore the accessibility considerations for now, and think about how much more fun eLearning would be if it involved flinging your arms about.



Flex for eLearning

September 21st, 2007

In the past I’ve had a hard job convincing colleagues and contemporaries of the value of Flex 2 (and the recently beta’d Flex 3). Firstly, it is not immediately obvious who Flex is aimed at; the Web Developers or the Flash Developers, (the answer is neither. Or perhaps both), so no-one is sure if it is their department. Secondly, because it is so new it is difficult to point to something on the web to say “there, that’s what Flex can do”, and blow people away with a cool demo.

But now Adobe have provided a useful resource to solve the second problem. Their new Flex Showcase, launched on Wednesday, is a directory of some of the pioneering Flex apps out there, with new apps being added every day. It is also a rather slick Flex application in itself, so instantly gives you a feel for the product.

I am convinced that Flex, and it’s sister app AIR, will dominate eLearning within the next five years, just as Flash is king today. Which is why the Futuremedia dev team are very interested in this technology. Even if many of our clients (without Flash 9) will not be able to use a Flex built course yet, we are developing in-house tools using Flex2 in preparation.

There will doubtless be lots of Flex evangelism at this year’s Flash on The Beach conference, and Flash Brighton are organising a Flex event to follow, both of which we are looking forward to. But for now, if you want further information and opinion you can also read my recent review of the book Programming Flex 2, or to get a feel of the product in action, go explore the showcase.



 
actionscripter.co.uk.com actionscripter.co.uk.com actionscripter.co.uk.com