Hi! Thanks for visiting my blog. If you've received any value from my content would you mind supporting my new startup by downloading our browser add-on? It's called PriceBlink and makes online shopping a breeze. You can watch it in action here and download it for Chrome, Firefox, IE, or Safari by going to PriceBlink.com. Thank you and I hope you enjoy!

Activating Flash Programmatically – Getting Around the Eolas Patent

Apr 30

After a recent Windows update you may have noticed that all Flash content (and any ActiveX control) displays a new message that says:

“Click to activate and use this control”

This only applies to Internet Explorer and is a result of a patent filed by Eolas, Inc. While I’m not interested in discussing whether or not I agree with this patent I’m glad to know that there’s a workaround. The workaround enables Flash content to be automatically accessible without having to click it first. I’ve found it rather annoying to see the dotted outline around Flash content and actually having to click to enable it, which I feel lessens the user experience.

Luckily Microsoft has released an article that discusses how developers can get around this programmatically. That means users will be able to interact with Flash content as they did prior to the update. The key is whether or not the developer or webmaster takes the necessary steps to enable this on their sites.

The fix is rather simple and basically consists of pulling your object/embed code out the document and writing it dynamically using JavaScript. For example, let’s say you have the following Flash content in your page:

[object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="" width="746" height="200" id="homepage_globe" align="middle" wmode="opaque"][param name="allowScriptAccess" value="sameDomain" /][param name="menu" value="false" /][param name="wmode" value="opaque" /][param name="movie" value="homepage_globe.swf" /][param name="quality" value="high" /][param name="bgcolor" value="#ffffff" /][/object]

All you need to do is replace this with the following code:

[script xsrc="my_flash.js" mce_src="my_flash.js" language="javascript"][/script]

and within the JavaScript include you’ll dynamically write the content to the page:

document.write(‘[object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="" width="746" height="200" id="homepage_globe" align="middle" wmode="opaque"][param name="allowScriptAccess" value="sameDomain" /][param name="menu" value="false" /][param name="wmode" value="opaque" /][param name="movie" value="homepage_globe.swf" /][param name="quality" value="high" /][param name="bgcolor" value="#ffffff" /][/object]‘);

After implementing this method your Flash content should automatically be activated and your users will never know the Eolas patent ever existed! Here’s a before and after shot:

Read More

Multithreading in Windows Mobile

Apr 29

If you’re looking for good information on executing multiple threads in Windows Mobile then check out this article. There’s a code snippet that really helps demonstrate the process of creating and terminating threads. I’m by no means a thread expert so I found the article extremely useful. I’m currently dealing with multiple threads in my Windows Mobile version of BlueGPS. Threading in Symbian was a nightmare and I must admit that it’s 100 times easier with Windows Mobile. I’m hoping to get a threading issue resolved and will release the BlueGPS cab for WM tomorrow or early next week.

Read More

BlueGPS for Windows Mobile Update

Apr 28

I’ve received quite a few emails about the Windows Mobile version of BlueGPS.  Just last night I finished the compass animation and should have a few bugs worked out this weekend.  I’ll be releasing it for public beta sometime next week and will create a landing page for the app.  It’s much more elegant than the Symbian version and updates should be easier to implement since C# keeps the code simple (and I need all the help I can get!).  Below is a screen of the compass in action and I’m very suprised at how realtime it updates.  I was walking in circles in front of the house last night (insert wise-crack here) and the compass stayed right with me.  It should since the display upates every second.  This will probably pose a performance issue at some point, but we can cross that bridge another day.

Read More

How Not to Get My $100

Apr 26

I love the effectiveness of HTML email when it’s used properly.  A bad example of an HTML email can be seen below.  If a business expects me to spend $100 on their product then I recommend letting me read the offer as well as any testimonials.  In the example below sent from Leadbetter Interactive the product description is in black text on a dark green background.  Bad combo.  The background fades to black in the second paragraph, which makes the text even harder to read.

If you look a little further down the image there’s a “What Golfers are Saying…” section.  They’re not saying much because it looks like it’s completely blank.  After using my mouse to select the text I realized that it’s black text on a black background…no bueno.  In the photo directly beneath this section there’s text that overlaps the photo and makes it look REALLY bad.  You’ve lost my business.

I’ve actually considered purchasing this DVD series in the past, but not today.  Maybe if they get it right next time I’ll consider.  That’s if someone doesn’t make me a better offer along the way!

Read More

FFmpeg and FLV Metadata

Apr 26

I received an interesting comment today that I wanted to respond to.  A reader was asking if there’s support for metadata (mainly to retrieve width and height) within the flv format and if it’s generated by FFmpeg.  In a previous post I talked about using Ruby on Rails to call a FFmpeg process to encode an uploaded video.  Newer versions of the flv format support metadata, while FFmpeg encodes an older format (v1.0 I believe) that doesn’t support it.  Click here for more information on flv metadata.

Here are a couple of options to consider when retrieving the width and height of the uploaded video.  My first suggestion would be to stream the output of the FFmpeg command to a text file and then try to read the dimensions from there.  You’ll see a line in the output that looks something like:

Stream #0.0: Video: dvvideo, yuv411p, 720×480, 29.97 fps

The second option would be to capture a frame from the video and use a server-side script to grab the dimensions of the image.  This may not be the most elegant approach, but I’m pretty sure it would work and you could grab the first frame of video extremely fast.  It would be pretty seamless from an end-user’s perspective.  If I get some time I’ll play around with a couple of approaches and post them here.  If you happen to come up with a solution I would love to hear about it.

Read More