dinsdag, november 20, 2007

Mariah Carey Desktop toy: Alpha release

I have had so many requests to realease the celebrated Adobe AIR Mariah Carey Desktop tool, so here it is for you to enjoy.

Click here to download it.

How it works:
1. The timer is a countdown to Mariah's birthday.
2. Click the Flickr logo and your desktop will be filled with Mariah pictures.
3. Drag the pictures around.
3. Drag an mp3 onto Mariah's head and watch the pictures dance.

Stuff for the next version:
1. Framing pictures.
2. Extra navigation, closing the pictures.
3. Better handling of the dancing pictures.
4. Fireworks and a video of Mariah instead of a picture :-)

Remember:
1. It's an Adobe AIR application, so if you don't have it, install the runtime first.
Download it here.
2. Adobe AIR is in beta, so changes can occur making this version of the Mariah Carey tool instable.

Some screenshots:


zondag, november 18, 2007

Flex components in Flash: Example with source

Here's how to load a Flex component in Flash and communicate with it through events.
This can be pretty nifty if you want to use the much better components that ship with Flex in your Flash application.

Click here to see it in action.
This example uses a simple button, but you could use a more complex datagrid if you'd like.

Here's the flow:

1. Load the Flex swf into your flash
2. Wait until the loaded Flex component reaches frames 2 (all Flex swf's have 2 frames indeed)
3. Add the eventlistener (for the event defined in the flex) on the application property of the loaded object. This property is actually a property of the SystemManager class. Remeber the SystemManager class does not exist in Flash. It's a Flex thing.

Here's some sample code to use in Flash:

import flash.display.*;
import flash.events.*;
import flash.net.URLRequest;
import flash.utils.Timer;

var loader:Loader = new Loader();
var timer:Timer;
//load the Flex Component
loader.load(new URLRequest("ButtonTest.swf"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderDone);
addChild(loader);

function loaderDone(e:Event) {
timer = new Timer(100);
timer.addEventListener(TimerEvent.TIMER, handleTimer)
timer.start();
}


function handleTimer(event:TimerEvent):void {
//cast the loader.content into MovieClip to access currentFrame.
var myclip:MovieClip = loader.content as MovieClip;
if (myclip.currentFrame == 2) {
//use application property to attach the event listener
myclip.application.addEventListener("iAmClickedFromFlex", clickedFromFlex);
timer.stop();
}
}

function clickedFromFlex(event:Event):void {
trace("clicked");
}


Flex code: (just a simple button)
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Button x="5" y="20" label="I am a flexbutton" click="dispatchEvent(new Event('iAmClickedFromFlex'))"/>
</mx:Application>


This message has also been posted on Boulevart labs

maandag, november 12, 2007

Mike Chambers and Lee Brimelow in Belgium

Mister Mike Chambers and mister Lee Brimelow were the guest speakers at our Belgian Adobe User Group.

It's been really great to have these 2 guys with us. Mike and Lee did 2 sessions on Adobe AIR.

Mike gave us some general insights on AIR and what Adobe will be doing in the future. Keep an eye out for Hydra and Thermo.

Lee is pretty new in the Adobe team and he did a really great session.
He's a funny guy, if you have the change, go and watch him or watch the video here.

Lee is a flash developer and works with AIR mostly from Flash.

Topics on Lee's presentation:

1. Using Flash or Flex? Let the project decide:


Pro Flex:
Flex rich component set
Flex Builder 3 coding experience
Flex data binding

Pro Flash:
when using animation
Video (FLV Playback component)
No extra weight from the flex framework.

2. System Tray is in AIR now :-)

3. Hacks to launch native procesess.

This was live blogging. The sessions are now done and some pictures and the video will be up soon.

Take care!