Posts RSS Comments RSS 145 Posts and 39 Comments till now

SWFUpload with flash 10

Flash player version 10 has new security restrictions with it’s javascript interaction.  It is no longer possible to trigger the local file picker from a javascript event.  Basically breaking the most legitimate use of flash in websites that I’ve seen in a while.

I use SWFUpload in a few sites to get multiple file uploads and upload progess bars.  It’s pretty slick.

The SWFUpload project has a beta release out that can work with Flash 10.  Here’s the basic changes required in your code to work with the 2.2.0 betas:

Right above your html that contains a button to trigger the file picker:

  1. <span id="spanButtonPlaceholder"></span>

You will want to give your button a fixed width and height.

Add the following CSS rules:

  1. .swfupload {
  2.     position: absolute;
  3.     z-index: 1;
  4. }

And finally, add the following options to your SWFUpload settings object:

  1.     button_placeholder_id : "spanButtonPlaceholder",
  2.     button_width: 100,
  3.     button_height: 40,
  4.     button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
  5.     button_cursor: SWFUpload.CURSOR.HAND,

This adds a transparent flash object over your html button that is the same size. Flash traps the click over your button and triggers the file picker from flash itself. Ironically, this work around for the tighter security restrictions in Flash 10 seems like a compete security risk in inself…

Pat wrote about fixing the flash 10 issue with the YUI libraries.

Looking towards the future

Specifically the next 24 hours.


2008 Electoral Vote Estimate


2004 Electoral Vote Estimate

I don’t see this presidential election being as close as 2004.

Obama looks like something out of the Matrix

Obama at a rally today in Chester, PA.  9,000 people attended despite the pouring rain.  These pictures look like Obama is a character in the Matrix movies.

Obama in the Matrix

Source.

I need to follow through on more of my goofy ideas

A few days ago I was explaining to my friend what Twitter is. He thought it sounded similar to a message board I made back in 2001 for my friends to keep in touch after we all left for college. At the time I wasn’t really familiar with blogging. I believe this was the first real code I wrote in PHP. It definately served it’s purpose well for a few years. As you can see from the stats, usage has died off completely. I think this concept was more along the lines of the blog aggregation “planets” (ResTek, Mozilla, gnome, etc) of today.

I will now claim that I almost invented Twitter.

Back in 2003, AIM was the hot shit with people living in the dorms. I really liked how much effort people put into their away messages. I remember a peticular away message of mine declaring how awesome last nights party must of been because I woke up and there was a beer bottle in my fish tank.* My idea was to write a script that logged the away messages of everyone I knew and stored them in a DB. I got really tangled up in implementation details. I tried using perl and some module that could connect to AIM. For some reason I thought I needed to use threading in perl. This became a giant nightmare as I knew very little of perl or threading at the time. Needless to say, the script never made it into a cron, and the rest was not history. I can’t help but wonder what kind of website I would have thrown together once I started gathering data…

These days I notice that people still put a lot into their status messages on gchat, AIM, etc. And facebook has fully embraced status updates as well. It took me a while to warm up to Twitter, but I’m really liking it now. How else am I supposed to get updates on what my friends are doing from a hut in some tiny village in Uganda that has no electricity or running water?

* I thought it would be a good addition to the tank so I drunkenly boiled it and placed the sterile bottle in the tank. It was a clear Corona bottle, and actually did work pretty well in a fish tank.

Colin Powell on calling Obama Muslim

Really impressed by this part of Colin Powell’s endorsement of Barack Obama:

I’m also troubled by, not what Senator McCain says, but what members of the party say. And it is permitted to be said such things as, “Well, you know that Mr. Obama is a Muslim.” Well, the correct answer is, he is not a Muslim, he’s a Christian. He’s always been a Christian. But the really right answer is, what if he is?? Is there something wrong with being a Muslim in this country? The answer’s no, that’s not America. Is there something wrong with some seven-year-old Muslim-American kid believing that he or she could be president? Yet, I have heard senior members of my own party drop the suggestion, “He’s a Muslim and he might be associated terrorists.” This is not the way we should be doing it in America.

Citizenship

My ballot was waiting for me when I got home from work today. I was very excited. This is the first time I have voted in Whatcom Country since I moved up here for college 8 years ago. I proceeded to fill out my ballot while blasting Queen – We Are The Champions on repeat. Good times. I don’t think the cat was amused.


I promise there was no digital modification of this image.

« Previous PageNext Page »