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


Simple 3D Drawing in AS3

October 6th, 2010

The right tool for the job is not always the most sophisticated one. There are a variety of 3D engines for Flash, each with their own merits. I even wrote one of my own a few years back. But there are times when all you want to do is a bit of programmatic drawing, i.e. creating lines, points and basic shapes in a 3D space, and for that particular purpose any of these powerful tools feels like overkill.

Basic 3D drawing is something that is very straightforward in other technologies, Processing or OpenFrameworks for example, but is one of those seemingly simple tasks that Flash can find quite difficult. If one employs something like PaperVision or Away3D for the purpose, you soon become very aware of the weight of these engines, as you watch your movies crawl after only a few hundred simple lines.

For the project I’m working on at the mo I needed to come up with a process for churning out some 100 Abandoned Artworks style experimentalism within AS3. After a day or two of R&D I came up with a rather elegant solution. It required only two simple steps …

Read the rest of this entry »



Apple vs Adobe = 1.1% vs 97%

September 30th, 2010

It’s very easy to get caught up in the hype surrounding Apple’s latest hipster gadget. But, in terms of cost of development vs. percentage of users reached, is it really worth building an Objective-C version of your web app?

Some interesting stats, and infographics.

iphone popularity



Flash is dead, long live … What?

July 8th, 2010

According to Steve Jobs, Flash is dead. He should know, because he’s the one holding the murder weapon. Flash is dead to Apple because they are not allowing it on the iPad, a device which otherwise would seem ideal for viewing the kind of rich media content the Flash platform excels at.

Obviously, Apple’s decision, and Jobs’ declaration, is not a prescient message from the future, but a company policy intended to protect the profits from their app store. They do not want their sexy device to be able to access all the rich content from the web, they want to be able to charge you for it instead. Even so, when someone like Steve Jobs declares Flash is dead, people take notice. So if the future is no longer Flash, … what is it?

Even before Apple weighed in, I’d noticed the demand for Flash has been on the wane. And even more noticeable has been the wavering interest of my fellow Flash devs. Symptomatic of these times, the Flash Brighton group, the collective home of the finest Flash designers and programmers in Brighton, is in the process of a rebrand, which will very likely include (gasp) dropping the word “Flash” from the group name.

On an individual level, I’ve seen many of Brighton’s finest recently devoting their attention to non-Adobe products. And these are the folks who know. So here are some of the technologies people have been playing with:

Unity – a 3D games engine, also banished from the iPhone via their T&Cs, but capable of some amazing browser based interaction. See http://blurst.com/ for many fine examples. If you want a Unity developer, may I recommend my friend and colleague Iestyn.

OpenFrameworks – a C++ framework, capable of creating multi-platform content. Ideal for interactive art, ambitious installations and audio-reactive work, but also capable of publishing to devices such as the iPad, iPhone and Android. This has been my own favourite toy of late.

Processing – a highly accessible language based on Java. Not so great for the web, but excellent for digital art, video or offline interactive work. For the web there is Processing.js, a JavaScript port, which is probably the best Flash animation alternative currently. I have written an introductory book on the subject of Processing, if you want to get up to speed that might be a good place to start.

HTML5 – this is Jobs’ answer to the lack of Flash on the iPad. Unfortunately, while HTML5 has a huge amount of promise, it is still many years away from Flash’s current power. Even if Adobe were to cease developing Flash/Flex today, by the time HTML5 had caught up the iPad will be a distant memory (because we’ll all have migrated to Android devices long ago).

Objective C – inevitably, many Flash devs don’t like being locked out of the platform-de-jour, so have been awarding their attentions to Objective-C, Apple’s OS language. Again, if you want an iPhone developer, there are people I can recommend.

Flex – while Flash demand is dropping, Flex demand has been on the increase. Flex app are still using the Flash Player, so they’re no more welcome on the iPad than any other breed of Flash, but it still remains the best solution for rich media online.

Personally, I disagree with Apple; there is still a future for the Flash platform. Although Adobe are going to have to pull their socks up to fight back, ignore Apple’s greedy posturing, and focus on all the things that HTML5 can’t do very well. Video for example. Or how about 3D?



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);

}


Flash On The Beach 2009 (video)

December 19th, 2009

There is now video evidence of my brief appearance at Flash On The Beach earlier this year, currently residing on the front page of the FOTB site. I hate seeing myself on film, but fortunately the majority of the video consists of the artwork I showed (from my “Abandoned Art” Generative Art project), which is perhaps the only reason why, three months later, I can now safely watch this without cringing.



Flash, Flex and Processing Work 2009

November 19th, 2009

It would seem the weight of guilt doesn’t get lighter by sharing, so this week I took two days out of my schedule to:

  1. update the portfolio
  2. implement the new site skin, designed by the very talented Charis (of WiredPortfolio) back in January.

Amongst the projects added from the last year are:

There’s also been a lot of extra-curricular (i.e. non-Flash) work this year, mostly Processing/Generative Art related. I’ve written a little about the “creative coding” book I’m currently writing (to be published in Summer 2010), but for fuller details of my Generative Art, my writing, and other more experimental work, you should visit my (award winning) personal blog here. Which is where, amongst other things, you can see a video of my work projected onto a Brighton church.



The Neglectful Freelancer

October 26th, 2009

They say it is a good sign if you visit a freelancer’s website and they haven’t updated it in a long time, because it can be taken as an indication they are a) very busy, and b) so in demand they don’t feel the need to sell themselves too hard. Both these are probably true in my case, but still I carry this huge nagging guilt about my poor neglected portfolio, which now has approx 10-15 projects waiting to be added.

It clearly hasn’t effected the work flow anyway (which kinda makes me wonder if maybe I should just get rid of the portfolio entirely), but recently I have had some rather awkward questions from clients asking “so, what kind of work do you usually do”. If you looked at my portfolio, frozen in time in early 2008, you’d think my focus was eLearning. A year earlier it would have been games. But the correct answer is neither of these.

So, for the record, the kind of work I usually take on is probably best summed up as: “the meatier end of Flash”. Which these days usually means Flex, but not always. On anything else – industry sector, technologies, job size – I am usually without prejudice. Although, if you are an arms dealer wanting a Flash game about shooting Iraqis, don’t even waste an email.

Anyway, I’m not trying to hawk my wares here, just trying to preempt the questions. I’m pretty much booked up until xmas right now anyway, mostly due to my Generative Art Book. But that, is another area of work entirely …



Speaking At Flash On The Beach 2009

August 3rd, 2009

Well, when I say “speaking”, I mean I’ve got three minutes! Which should be just enough time to get on stage, get my laptop hooked up to the projector, make sure it’s got sound, introduce myself, apologise for having no time left and get off.

I’ve been selected to present one of the Flash On The Beach Elevator Pitches, twenty micro-sessions showcasing “hot new talent”. On first hearing of the idea I thought it would be impossible to fit anything meaningful into so short a time – when I spoke at Flash Brighton earlier in the year it ran to more like three hours. But, as Seb reminded me, this is more of a teaser trailer rather than a full feature, so I’ve now got something in mind (something new and previously unseen) which I hope will do the trick. I don’t think there’ll be time for questions though.

To get an idea of what you might expect, see my recent postings over at zenbullets.com. And if you’re at the conference please come and see me. You will be allowed 3.5 seconds in which to applaud.

fotb09_badge_468_60



Code Poetry: Blake’s Jerusalem

July 15th, 2009

Amongst the forthcoming Flash Brighton sessions in the calendar we have a talk on William Blake by Rich. This news prompted the following from Neil:

var bow = bringMe("burning gold");
var arrows = bringMe("desire");
var shield= bringMe();
var clouds = Clouds.unfold();
var chariot= bringMe("fire");

do {
   mentalFight.cease = false
   sword.sleep = false
} while (! England.pleasantpastures.isJerusalemBuild())

Note this code will only run in green and pleasant lands.



Flash/Flex Twitter Mashups

May 19th, 2009

twitter-bird

I’ve written a new tutorial: ActionScript and the Twitter API, Simplified



Farewell Flex Builder, Hello Flash Builder

May 16th, 2009

flash builder

The next version of Flex Builder (V4, code named Gumbo) has been renamed Flash Builder.

Makes sense. Flex is only the framework, Flash is the platform we are building for, whether we are using Flash or Flex. I was starting to feel a little odd referring to myself as one of Brighton’s Flash Developers when I hardly ever open Flash. Technically, seeing how 90% of my work over the last two years has been built using Flex Builder, I am probably better described as a Flex Developer these days. At least I don’t need to worry about such rubbish now.

Flash Builder (aka Flex 4) is expected to have a Beta release in June, with final release expected in the last quarter of 2009.

If you have any questions on the rebrand, there is an FAQ here.



The Differences between ActionScript 2 and ActionScript 3
(according to Flash Brighton)

May 16th, 2009

as3.0 is like a strict german mistress. Very harsh but gets good results.
as2.0 is your stoner friend from college.

as1.0 is for script-kiddies, designers and other non-technical people
as2.0 is for girls
as3.0 is for real men

as3.0 is carefully crafted formulaic pop – predictable, slick, reliable, dull
as2.0 is glitchy electronica – some semblance of form, but playful with it
as1.0 is a child bashing saucepans – imprecise, messy, but lots of fun

as3.0 is a Japanese Chef’s knife. Finely crafted but requires care and technique in its use.
as2.0 is a Machete. Great for hacking things, but useless for anything requiring fine detail or control.
as1.0 is a plastic spoon.

With thanks to Owen and Jim.



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