30 September 2006
Written by
Richard Leggett (

)
Published on September 30th, 2006 @ 02:08:08 pm, using 57 words, 206 views
Take part in a Flash Lite (and J2ME) contest courtesy of the Mobile & Devices Adobe User Group of Rome and Jamba...

Flashlite category:
• 1st prize: Flash Studio 8
• 2nd prize: IRiver 2G
• 3rd: 3 O’Rilley Books
J2ME Category:
• 1st prize: Nokia N93
• 2nd prize: IRiver 2G
• 3rd prize: 3 O’Rilley Books
Enter the contest here
.
29 September 2006
Written by
Richard Leggett (

)
Published on September 29th, 2006 @ 08:52:05 am, using 335 words, 245 views
I just came across this Doodle Javascript app on MXNA. Mistakenly I said to colleagues, anyone could do that in under a minute in Flash. This was met with the obvious, OK go on then. Instead of getting a really bad looking jagged-lined, clunky drawing tool using 5 Javascript libraries (that don't even work in Safari I am told), you could just plug in 27 very basic lines of code into Flash...
createEmptyMovieClip("bufferMC", 1);
var mousedown = false;
var origX = 0;
var origY = 0;
function onMouseDown() {
origX = _xmouse;
origY = _ymouse;
moveTo(_xmouse, _ymouse);
lineStyle(1, 0, 100);
bufferMC.clear();
mousedown = true;
}
function onMouseUp() {
lineTo(_xmouse, _ymouse);
bufferMC.clear();
mousedown = false;
}
function onMouseMove() {
if (mousedown) {
bufferMC.clear();
bufferMC.lineStyle(1, random(0xFFFFFF), 100);
bufferMC.moveTo(origX, origY);
bufferMC.lineTo(_xmouse, _ymouse);
updateAfterEvent();
}
}
Mouse.addListener(this);
Now I am very much keen to advise using HTML and Javascript when it is the obvious choice. But what gets me is when people go out of their way to make technologies do things that others clearly do a lot more naturally. Hence this blog is HTML, so I always think to myself, choose the right technology for the job and don't create work for yourself! 
As a bonus the fact that Flash is made for this sort of thing brings with it some nice extras, you might notice that with 2 seconds of extra effort here we have the line colour changing as you move until you release, or why not comment out the 3 lines that say bufferMC.clear() and see what you get.
Sample (345 bytes):
26 September 2006
Written by
Richard Leggett (

)
Published on September 26th, 2006 @ 10:50:59 am, using 147 words, 525 views
It's no suprise that smartphones have been rising in popularity in the last few years. I swear by my Nokia for syncing up outlook, contacts, calendars etc, it's great for backup in that respect and work great abroad being mainly tri-band. They are also perfect for Flash Lite development, with the ability to install any version of the player you wish, along with other useful applications like Google Maps. But these phones are so bulky. The N95 seems to be the first to be of reduced size in the last 3 years where the size has remained fairly consistently large since the pocket bursting 7650. Hoping for a bit more to get shaved off in the next wave but I do like the dual-direction slide to make maximum use of the limited space. Did I mention it also has a 5 Mega-pixel camera? 
Pictures and article can be found here.

20 September 2006
Written by
Richard Leggett (

)
Published on September 20th, 2006 @ 02:41:10 pm, using 148 words, 415 views
Just to announce I've uploaded my FlashFoward Austin 2006 slides and source.
You can download the zip here.
As soon as time allows it... a mini-tutorial that goes a little more in depth as to how the multi-user example works and how you can set up SUSHI on your machine (the docs that come with it are great though, so get downloading!
In the meantime, to enable HTTP support in SUSHI, you need to follow the instructions supplied with the SUSHI manual, for example, all I had to do was uncomment this line in my Apache httpd.conf config file:
LoadModule proxy_module modules/mod_proxy.so
...add the following to the end and restart it:
ProxyPreserveHost On
<VirtualHost *:80>
ProxyPass /sushidemo http://127.0.0.1:5556
ProxyPassReverse /sushidemo http://127.0.0.1:5556
</VirtualHost>
Of course 5556 is the port my SUSHI admin.xml configuration file is set to use for HTTP tunneling mode.
08 September 2006
Written by
Richard Leggett (

)
Published on September 8th, 2006 @ 03:40:43 pm, using 311 words, 465 views
A couple of weeks ago we launched several installations in Nike Town, Oxford St., London as part of Nike's Festival of Air, along with the accompanying website. It all kicked off with a fantastic launch party and there was a lot to see and do, I got to meet someone I consider an inspiration in UK hip hop and grime, Dizzy Rascal, and a good time was had all round. But down to the technology...
Two of the things we delivered using a combination of Adobe Flash and some other very custom software and hardware were: a touch sensitive holographic floating shoe (see video on site) and the first part of an interactive event, Ball on Air. With Ball on Air participants register on terminals, kick off their shoes and slip on some Nike Air 360s, then shoot a hoop in front of a high speed camera in an attempt to jump higher than NBA's LeBron James. The software then composes you and ghost you's onto a real world court and measures the height of your jump. Within a minute you appear on the big instore plasma with your name and score for all to see, and you're also on the website for when you get home.

Over the weekend that will switch to the Run on Air event where runners can challenge Paula Radcliff's (unbelievable 12.5mph over 26miles) marathon pace on treadmills, capturing the moment for you to look back at in time to come.
If you are in London this weekend, or any time within the next two weeks, head on down to Nike Town on Oxford St. to enjoy the experience, if not, feel free to catch some of the action in the video on the site. That's all for a week, time to pack my bags for FlashForward, hope to see you there if you are going.
05 September 2006
Written by
Richard Leggett (

)
Published on September 5th, 2006 @ 04:50:58 am, using 321 words, 619 views
I seem to be getting casting failing (returning null) when I have a class that extends a class that extends MovieClip. Here's an example...
MyWidget extends SimpleButton
SimpleButton extends View
View extends MovieClip
That's the inheritance chain, SimpleButton and View are some base classes I have written for use in various projects and are not part of the v2 components. Here's what happens when I try to cast an attachMovie():
var aWidget:MyWidget = MyWidget( attachMovie( MyWidget.LINKAGE,
"aWidget", getNextHighestDepth() ) );
trace( aWidget ); // null
That should not be happening of course. Now if we change MyWidget to extend View instead of SimpleButton...
var aWidget:MyWidget = MyWidget( attachMovie( MyWidget.LINKAGE,
"aWidget", getNextHighestDepth() ) );
trace( aWidget ); // _level0.blah.aWidget
Now there's nothing wrong with SimpleButton per se, it does this in other situations, with different inheritance chains (and using v2 component architecture), but it does seem to be failing when the chain gets to a certain length.
The quick fix is to return an instance of MovieClip and cast that afterwards (cheers Dan):
var tempMC:MovieClip = attachMovie( MyWidget.LINKAGE, "aWidget",
getNextHighestDepth() );
var aWidget:MyWidget = MyWidget( tempMC );
trace( aWidget ); // _level0.blah.aWidget
I don't remember this happening in the last few years, before Flash 8 and even whilst Flash 8 has been out, yet it has hit a few of us all at once just recently, it's as if some update has been released that causes this behaviour, and I know I've never had this problem before with the same code methodology. Is anyone else experiencing this, or do you have some extra information on why this happens?