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.

Tuesday, January 27, 2009

Why Isn't There More Telecommuting?

It's time for America to start using the internet to enable more people to work from home. The benefits of telecommuting instead of spewing exhaust fumes for 30 miles to and from work are enormous - environmentally, energy independence-ly, and personally.

Aside form the fact that it would solve the World's most pressing problems, if more people worked from home - instead of neighborhoods being a ghost town from 9 to 5, they could be vibrant communities again. Parents could be there to greet their children when they get home from school at 2:30 instead of picking them up from a holding pen at 6:20 PM.

The new approach to setting depths in AS3 sucks.

Am I missing something. Or is the new approach to setting depths in AS3 far inferior to the old AS2 way?

With the old way, you could specify an absolute depth. This enabled the creation of a sort of depth tree that you could reference to see exactly where every layer was in relation to the other layers - like this:

With AS3, depthing is relative. It's not trivial to "sandwich" a layer in between two layers that already exist. I like AS3 - but the new depthing is a step backward.

Sunday, January 25, 2009

Resizing the Flash Stage At Runtime

Check out the demo here

The conversation regarding Flash vs. DHTML (aka. AJAX) got me wondering about some of the old Flash bugaboos.

1. SEO - I think we've put that one to rest now. Using Faust and Progressive Enhancement (swfobject), there is no difference in SEO value when using Flash vs. HTML. And it's easy to implement.
2. Can Flash resize itself on the fly ? Yes (see test)
3. Does Flash performance degrade when the Flash Stage is very large? No (see test)

Enter any value in the width / height boxes. The Flash object's dimensions will increase / decrease accordingly. Even at ridiculous sizes (say 3000 X 3000) there is no degradation in performance in the video. Video is very processor intensive.

I dare you to find a browser this doesn't work in.