FUGN Talk - Bunny Love
Posted on Monday, April 06, 2009 @ 19:58 CET

Today at the monthly FUGN meeting I presented the apps I wrote this weekend to control my Nabaztag from Flex, AIR and iPhone as I wrote about in this previous post.
You can get the slides here as a Keynote preso or get the PDF.
Øystein posted some images on Twitpic while the talk was under way.
- paulo
Return of the Nabaztag
Posted on Monday, April 06, 2009 @ 19:29 CET

Two years ago I bought a Nabaztag after reading Aral's posts on playing with it. After watching his presentation at FOTB'07 I made a small Flash app for the Wii browser using SWX. SWX made it dead simple since a) it let you avoid proxy's when pinging the API, and b) the result is sent back as AMF so you don't have to deal with XML parsing in AS2 which is a royal pain (the Wii only supports Flash Player 7 so no AS3 and E4X for you).
Anyways, last week Matt Chotin wrote a post asking for a Flex app to control their QA manager's bunny. The cool thing was that they talked to the guys at Violet (that make the Nabaztag) and they added a crossdomain.xml to the API domain. This means you no longer need a ColdFusion/PHP/SWX middleman and can talk to their API directly from Flash. Sweet!
So I dusted off the bunny and built a quick Flex app that lets you send a message to a bunny and control its ears. To control your own bunny you need to get the serial number and token from the Preferences section of the Nabaztag site. Once you have these, enter them and hit save to store them to a local Shared Object (I'm using a Shared Object to completely bypass the need for anything server-side).
For funsies I turned it into an AIR app that lets you control the ears using a Wiimote via MoteDaemon using my AS3 library. Both the Flex and AIR versions are view source enabled so right click for the goodies.
Since lately I've been delving into iPhone development I threw together a small app that lets you do the same thing from your phone, screenshots below.


But seeing as there is already an app out there that does this and better I don't think I'll be releasing it. Anyways, if you have questions drop me a comment :)
- paulo
Nordic RIA tour
Posted on Monday, March 30, 2009 @ 15:34 CET

Tomorrow Adobe kicks off their Nordic RIA tour here in Oslo. The morning sessions are designer focused with talks covering client work and Flash Catalyst (the artist formerly known as Thermo). The afternoon is focused on developers and contain talks on Flash Player 10, Pixel Bender, Flex 4, Live Cycle and Hello Group's Peter Mølgaard who also presented at Flex Camp Norway.
Jensa and I will be there as part of the FUGN delegation so if you have any questions or just want to say hi feel free to drop by :)
You can find more info on the event here.
- paulo
FUGN Talk - Sharing is Caring
Posted on Tuesday, March 03, 2009 @ 11:32 CET

Holy crap its been a long time. Not dead yet, just crazy busy in the new year - how exactly is it March already?
Anyways, yesterday I had a short talk on SharedObjects and storing your own VOs in them at the monthly Flash User Group Norway meeting (FUGN). You can download the slides here as a PDF, or get the Keynote slides here.
The links in the talk are listed below:
- SharedObject API
- SOL file location
- Minerva
- Flash Player Settings Manager (http://icanhaz.com/flashsettings)
If you have any questions simply drop me a comment :)
- paulo
Playing with a Wiimote in AS3 on OS X
Posted on Tuesday, December 09, 2008 @ 15:51 CET
So I've finally gotten around to playing with using a Wiimote with Flash. I started looking at the WiiFlash project but the server is Windows only and since I'm on a Mac I kept looking and eventually found MoteDaemon.
Now due to security restrictions with the Flash player, all socket servers need policy files and although the source is provided for MoteDaemon I didn't want to mess around with it in Xcode so I just made a quick AIR app that lets you play with it. The MoteDaemon included ActionScript library is AS1, so I ported it to AS3, which you can view source and download here.
To get it up and running:
- Download MoteDaemon from SourceForge and install it
- Run MoteDaemon and pair your Wiimote
- Download, install and run the AIRWii test app. Then click connect.
Now you should be able to see what's going on with the Wiimote. Next step is to do something with this data :)
The AIR app also has the source included for funsies.
- paulo
Extending your own MXML component inline or in another custom component
Posted on Monday, November 24, 2008 @ 18:57 CET
Earlier I was trying building a custom MXML component in Flex 3 with some basic functionality, lets call it MainComponent. The thinking was that it would handle all that stuff and then I could create "children" of it that would extend this functionality and contain their own content and extra methods.
I tried simply extending the MXML component, by setting the root node of another custom component to MainComponent but this failed with the following:
Googling around a bit I found this post over at Tink's about extending your own MXML components. As it turns out its not possible to do this as I was thinking, but instead you create an internal Array of children to add to the main component and handle it yourself. You add stuff to this array in MXML using the property name as a tag, but as Ely Greenfield pointed out in a comment on that post, you can bypass this by using the [DefaultProperty] metadata tag. He wrote:
So when you extend your custom component inline you can avoid those tags. However for some reason I didn't get around this when creating a child component as its own MXML file, but whatever - its one tag, I'll live.
Check out the example here (right-click for source) and you shouldcheck out Ely's comment which was very helpful.
- paulo
More dialog FAIL
Posted on Tuesday, November 18, 2008 @ 13:11 CET
Not sure why but lately I've been coming across more and more of these horrible dialogs. For example, I had this fantastic error pop up in FlexBuilder:

And last week this great one when trying to use Nordea's net-bank:

Dialog FAIL indeed.
- paulo
Adding .as and .mxml support to QuickLook
Posted on Tuesday, November 18, 2008 @ 11:49 CET
I love me some QuickLook, but after installing TextMate (and I don't know if this is what broke it) all I get is a Text Document icon when trying to QuickLook AS and MXML files. I came across a plugin called QLColorCode that adds color highlighting to XML files, and this other post that shows you how to hack it to do MXML too.
I simply followed the same instructions to add .as support, except for the language highlighting file since that already existed for ActionScript although doesn't seem to be used.
In any case, if you want to skip editing the contents of QLColorCode, then grab this file, unzip it and put it in /Library/QuickLook.
Oh, standard disclaimer applies - if it breaks your machine its on you :) But it works for me.
- paulo
More iTunes dialog fun - Sync Override
Posted on Tuesday, October 21, 2008 @ 19:59 CET
So today I get home from work, pop the iPhone in the dock to do a quick sync of some videos and I get the following dialog box:

What the hell? It synced fine this morning... Hmm, I wonder what the Override button does? Well, it overrides whatever happened and now it syncs again.
Very weird.
- paulo
Introducing swfversion.com
Posted on Wednesday, October 15, 2008 @ 16:11 CET

Last week I spent way too many hours trying to figure out why this SWF from an agency wasn't working when being used in a client's CMS. Turns out the CMS used another SWF that loaded in all other Flash content. The reason behind this was to show a generic preloader when loading Flash-based content across the board. Fine, makes sense but why doesn't it work?
Sound familiar? Loading SWFs into other SWFs doesn't "just work". Now we have two virtual machines, AVM1 for SWFs upto and including Flash 8, and the awesome, super-fast AVM2 for Flash 9 and above. Loading AVM1 stuff into AVM2 works fine (just don't try talking to it), but AVM2 into AVM1 not so much.
And that's what was going on. After much debugging, decompiling and tearing hair out I decided to check the version and of course that's what was going on. The SWF8 preloader was trying to load in a SWF9 and that was causing all the weird behaviour. So after talking to Chris we figured something had to be done to avoid wasting time on silly things like this in the future.
Enter swfversion.com. You'll need to upgrade to Flash Player 10 first, and then you can load any SWF whether its online or on your local filesystem to find out what version of the Flash Player its targeting, along with what version of ActionScript and frame rate.
Hopefully it will be as useful for the community as the excellent playerversion.com (Aral Balkan's tool for getting at the installed Flash Player info) and James Ward's Is It Flex (to check if that SWF was made in Flex).
As has been my thing lately, you can also use iCanHaz - simply use http://icanhaz.com/swf/<URL>
Enjoy :)
- paulo


