Archive for July 2nd, 2007

A Simple YouTube Jukebox Using JavaScript / DOM And deconcept’s SWFObject

Recently asked on Yahoo! Answers:

HTML Help - Dropbox with Loading Option?

Okay, here’s my issue. I have a decent piece of coding that gives me a dropbox. The dropbox has a ‘go’ button, and it is filled with titles of music videos from YouTube.

Now, used alone, it’s fine. It opens a new page, which plays the youtube video.

However, I was clever enough to grab the *embed* names. So, it doesn’t load a simple youtube page, but simply the video in a website.

So now, I need some HTML help. I would like to create an object that sits next to the dropbox and plays the video when you select ‘go’, instead of it loading a new page.

I know how to make an embedded video. I know how to make the dropbox. Unfortunately, I don’t know how to make the dropbox and the embedded video interact, so that I can select the video I want to play.

This is very easy to do, thanks to deconcept’s excellent SWFObject JavaScript library and the questioner’s work in extracting the Flash FLV player URLs from all the videos he wants to show.

So, let’s get right on making a YouTube jukebox!

Read the rest of this entry »