Tuesday, March 24, 2009

I hear and I forget. I see and I remember. I do and I understand - Confucius.

Just One Wire to Use your TV as a Giant Computer Monitor

If you have a relatively new flat-screen TV and a relatively new lapTop you can easily use your TV as a giant monitor for your lapTop. And this means you can start enjoying the many online video sites that are carrying your favorite content - from classic TV shows to spanking new 30 Rock or Saturday Night Live episodes.

Last night I watched the Mary Tyler Moore show where Rhoda decides to move to NY to take a job at Bloomingdales. Took me back... Oh yeah and the original Bob Newhart show. And for the intelligentsia, don't worry, they have every Gilligan's Isle ever made. That's right - Ginger and Mary Ann together again.

Some of the better online video sites:

Hulu.com
TV.com
ABC.com
Discovery.com
YouTube.com

There's hundreds of them. All you need is one wire - an HDMI cable. Connect your lapTop HDMI slot to your TV HDMI slot and you're surfing the internet. Is it time to quit paying for cable? Check it out - you decide.

BTW - HDMI stands for - High Definition MultiMedia Interface

Flash Local Connect - avoiding a common, killer bug

LocalConnect is extremely useful, especially these days since it's a very good way for an AS3 app to talk to an AS2 app. They can't communicate directly - but you can probably get around that with LocalConnect. But there is a pernicious bug that will leave you scratching your head if you aren't aware of it. As luck would have it, I'm about to tell you how to fix it.

With LocalConnect, you have a sender and a receiver. The receiver broadcasts his intentions to be a receiver by first instantiating the LocalConnection object, then calling the "connect" function like this:

var rcvConnection:LocalConnection = new LocalConnection();
rcvConnection.connect("myHandle");

Meanwhile, the sender has also instantiated a LocalConnection object in the same manner:

var sndConnection:LocalConnection = new LocalConnection();

And when he wants to talk to the receiver he simply calls the send method like this:

sndConnection.send("myHandle", "nameOfFuncInReceiver", "param1", "param2");

The killer bug arises if there are two or more receivers that are using the same handle. The sent message will be consumed by one and only one of the receivers. So if it's not the receiver you're expecting to get the message you're sitting there wondering "where is my freaking message?" Well, your freaking message was consumed already and you'll never get it.

Solution:

When you instantiate your Flash objects (using swfobject, of course), you will pass each SWF (sender and receiver) a random number (the same random number) generated at runtime using JavaScript. When the receiver broadcasts his handle, he now appends the random number to the string so that the handle becomes - "myHandle_1234567".

Likewise, the sender uses the same random number to append to the string he uses to call the receiver. So the send call becomes:

sndConnection.send("myHandle_1234567", "nameOfFuncInReceiver", "param1", "param2");

Problem solved!

Monday, March 23, 2009

The Future of the User Interface - Part One

As we (Web Developers) creep slowly toward the living room TV set, it's time for us and our Design counterparts to start re-evaluating the user interface.
Will the browser that lives in your TV look and behave like the browser on your PC? I think not. One big difference will be that most pages will not be the long, scrollable pages we're used to seeing on a PC. Instead they will be RIAs that occupy just one screen. There will be nothing "below the fold". Further information will appear when the user clicks a button (or speaks a command) - but the user will not have to scroll down to see the content.
Voice will gain prominence over the mouse as we move to the living room. Instead of a remote or mouse, we will have little microphones near us or attached to us. Or the TV's mike will be powerful enough that we can just talk to the TV.