Oh, Canada…

Todd Bertuzzi and Ed Jovanovski celebrate being chosen to Team Canada. (CP Photo/Richard Lam)The shouting could be heard through the hallways. Every television in the building (and there are quite a few) was tuned to a rival, but for once no mention of this was made. Hopes were high, adrenaline running to the extreme.

Sadly, it is over. Canada has been eliminated from the medal runnings in Men’s Hockey at the 2006 Olympics. This day shall forever be remembered as one of defeat.

Exhilarating game, though, sad as it’s final moments were.

There’s always 2010.

And, of course, this is a good time to point out that our women’s team won the gold. So we’re still no slouches at our national pasttime. Mnyaah. Thbbbt. (That last bit is a Calvin and Hobbes quote, of course.)

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

Argh. I Hate Flash.

Ok, no, I really don't.

[Disclaimer: Flash is uber-good. It really is. Like anything that is uber-good, however, there are always going to be little imperfections that serve to frustrate. Which is what I'm talking about. Frustration. Really, I love Flash. We go way back. I think she can take it.]

Flash MX 2004 added type-safety - to a degree. We all know that as soon as we use an Array, for example, our typing is out the window. What many people don't know (and what some who do know consistently forget or ignore), is that on a timeline in Flash, type-safety is not what it should be.

Take this fictitious class, for example:

  1. class jn.Jabberwocky extends Object {
  2.      public static function Wockit( value:String ) : String {
  3.           return value.toUpperCase();
  4.      }
  5.  
  6.      // don't allow instances to be created
  7.      // this class only contains static members
  8.      private function Jabberwocky() {}
  9. }

Now, on a timeline somewhere:

  1. import jn.Jabberwocky;
  2.  
  3. var str:String = "This parrot is deceased. Expired. What we have here is an ex-parrot.";
  4. var wocked:String = Jabberwocky.Wockt( str );
  5.  
  6. trace( wocked );

If you run that, you should see 'undefined' in the trace window. Why?

Because Flash didn't generate a compile error, even though there is no Wockt method on the Jabberwocky class. Eet's a type-o. Shoulda been 'Wockit'.

Want even more fun? Try this (say, frame 1 of a fresh movie, with a button on the timeline named, ironically enough, "button"):

  1. function Button_Clicked() : Void {
  2.      trace( "You clicked the button." );
  3. }
  4.  
  5. button.onRelease = Delegate.create( this, Button_Clicked );

Test the movie. Click the button. Nahda.

Again, why? Flash generates no compile error due to the missing Delegate class. To have this work, add "import mx.utils.Delegate" or fully qualify the call to Delegate.create.

The problem here is that MovieClips are dynamic classes, allowing for the dynamic addition and removal of methods/properties at runtime. Hence, you can't run type checks on calls, because it's entirely possible (plausible, heck - practically a given) that the method or property called will resolve properly at runtime but not at compile time. Which is, usually, a good thing - makes for RAD and fun/cool Flash-isms (translation: code that would make anything other than a Javascript/VB developer cringe, yet manages to do really neat stuff).

Solution? Don't develop on the timline. Always create an application class, instantiate it, pass the timeline to to it, and let it do it's thing.

Or don't make type-o's (which really do seem to be the bane of my existence lately).

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

Stupid Type-O’s

Like when you mean to type "step away from the code" and instead type "step away from the coed".

:)

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

You Think You’re Tired?

I don't see how this is even possible, given that the most I've ever pushed it is 72 hours (and, if I remember correctly, I was much younger then...but as I get older my memory is going, so I can't be sure).

Apparently, there's a dude in Vietnam who has been unable to sleep for over 30 years. To add insult to injury, the people who live around him have taken to using him for their nighttime tasks (no, not those nighttime tasks...).

Vu also said when the commune was planting sugar cane, several people also asked Ngoc to awaken them at midnight to go to work, since he was up anyway.

His wife said, “My husband used to sleep well, but these days, even liquor cannot put him down.”

She should speak to Dick Cheney - shotguns are much more effective for putting people down. (Yes, ok, that was totally uncalled for.)

To be fair, this isn't new news. So sayeth fuzzz and the lobotomy guy. Apparently it's been showcased on Ripley's, and it must therefore be true.

Read some more @ thanhniennews.com.

Oh, yeah - Brrrreeeport this, sucka.

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

IE, Flash, Xml/LoadVars, and GZip

Can't we all just get along?

It seems that Flash and Internet Explorer have some communication issues. Namely, when a server returns GZipped data to IE for consumption in Flash, Flash don't get no sugah.

Rather, Flash never gets the data. Which is messed up.

See this quote on the LoadVars page on LiveDocs (it's buried in the comments, so I'm quoting it in full here to save you the time - I haven't seen a response from MM/Adobe on the issue):

drusunlimited said on Jun 16, 2005 at 7:18 AM:
I have found a bug in Internet Explorer that affect flash: when a query is done to a server an the server response in content enconding:gzip, the explorer don´t communicate with the flash activex.
I finally found a solution, changing the server settings in order of don´t use this content encoding mode. But the problem exists.
Good luck.

In all likelihood, this is an IE issue, not Flash, as Firefox has no such issues (of course, it's a different player, one a 'plugin', one an active-x control, but I'll give MM the benefit of the doubt).

Anyone else out there encounter this? And, please tell me so, a method of dealing with it that doesn't involve turning off compression on the server?

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

Fender Meets Intel

It seems Intel want to get into every pair of pants device they can. Some might call them device sluts.

Yeah, that's right. Device sluts. I like that.

The latest? Intel chips (and laptops) right in your Fender Telecaster. Sheer brilliance. Record, upload, download, share - all on guitar. Wifi, too. This should really take air guitar to new heights.

Myself, I'd be interested to hear the sound; losing all that wood to put in the laptop will probably cut back on the resonation, which would hurt the tone. Even with that, if you see one of these and are feeling particularly generous, get in touch with me and I'll let you know where to ship it.

hehe.

More info @ popgadget.net and gizmag.co.uk.

Thanks, Mike.

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati