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:

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

Add the following CSS rules:

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

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

     button_placeholder_id : "spanButtonPlaceholder",
    button_width: 100,
    button_height: 40,
    button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
    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.

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.

I just had a really great text message conversation with a stranger

RANDOM NUMBER: Kay i have kids staying th night over here tonight but no kids tom after four.? When is a good time for you for me to come over and pay you?

ME:You can pay me anytime. But i think you have the wrong number.

RANDOM NUMBER: What do you mean wrong number? I am still paying you you one hundred thirty.:)

ME:I mean I don’t know you.

RANDOM NUMBER: Its Tina

ME: Hi tina. I don’t know you.

RANDOM NUMBER: OMG i am so sorry i am one number off!

RANDOM NUMBER: I am so sorry your number is really close to my friends.:) sorry again

ME: no prob

Written by Comments Off on I just had a really great text message conversation with a stranger Posted in General Tagged with

Trying to cool down the hallway

Summer finally arrived in Bellingham. Yay! Now it’s too hot. And the hallway in our apartment is approximately 20 degrees warmer than outside or in our unit. The hallway is probably so damn hot because almost zero air moves through it during the course of a day. The 2 stairwell doors are always closed and the elevator doesn’t let in much air when it opens. At the end of the hallway is a window that lets in sunlight and the door to the “community deck.”

I had an idea this morning to prop the deck door open to let air in during the day. I figured it shouldn’t bother anyone and the door doesn’t lock so it’s not a security issue. I propped it open this morning with an empty plastic bottle and when I left for work 30 mins later it was gone. Dun dun dun…

I never see anyone in my hallway, or on the deck. I found it very weird that someone took the bottle out ruining my cooling experiment. I tried again with an empty milk jug this evening at about 9pm and it was gone again at 10:30. WTF. I think I will keep trying until our recycling bin is empty. I really wanna know who is closing the door (and indirectly taking out my recycling). It’s impossible to not notice the obsene heat in the hallway, so wouldn’t most people think it’s a great idea to prop the door open?

More as this story develops.

Written by Comments Off on Trying to cool down the hallway Posted in General Tagged with