Flash Video Display with Closed Captions – The Easy Way

by leon on September 26, 2007

*Updated*

If you need to add Closed Captions to Flash Video, this app is the easiest way to do it. All you need to do is link to the swf of embed it in your movie, change a few parameters and its all configured. The Captions integrate beautifully with the standard Flash Video interface so it looks neat and professional.

This project was created while trying to create a custom video playback display. The brief was to create a re-usable video window to play external videos and display captions. There is also full control over the display itself in terms, of auto play and window size. The code is fully commented, and allows you to cater for users with accessibility issues. The main feature is the Closed Captions tool. This has been custom built and included so that users can get a textual description of what is happening on screen. The video player itself is self contained within its own movie clip, so you can just drop it into your Flash files. This was built for Flash MX 2004/8. Sorry for the lack of CS3 support, but the platform I was working on does not have support for this yet.

Creating the button.

On to the interesting part, its possible to create a button and style it so that it appears to be part of the standard Flash Video Display UI. The code is below, download the Flash file, and it will all make sense. Everything is commented. If you decide to add this to your own Flash file, be sure to add an instance name of ‘videopane’ to the Movie Clip.

Code for styling the UI components:

_root.videopane.showcapbut.setStyle("toggle", false)
_root.videopane.showcapbut.setStyle("color", 0x6F7777);
_root.videopane.showcapbut.setStyle("fontFamily", "Verdana");
_root.videopane.showcapbut.setStyle("fontSize", 13);

The above code styles the ‘CC’ button, which has been positioned so that it looks like part of the UI. The properties are a bit hit and miss. This page shows some other variables.

The code shows how to create a toggle effect so that the captions can be turned off and on, and also the default position of the captions (i.e. turn them on at start up).

Creating the Closed Captions

To create the captions I set up a text box, that could b turned on and off (change the Y value accordingly).

A listener is used to display the captions which are created from two array’s. One for the time in seconds, and the other for the array text. You can add as many captions as you like, just change the array.

A caption is also displayed showing ‘Video Finished’ when the video completes. This is achived by creating a listener that listens for the completion of the video.

Other Features

Some video’s may require a disclaimer. For legal reasons this must always be on the page. For this reason a text box is created called ‘disclaimer’ which allows you to add a disclaimer. However if the captions are set on by default this is covered up. You can change this by moving the disclaimer text, or adding your disclaimer to the captions. Its up to you.

A line is added to stop the video being displayed in full screen via the tab in the top corner.

View a demo here.

Source Files Below:

Custom Flash With Captions

Snap Shots

by leon on September 26, 2007

Snap Logo

Just added a little update to the blog called snap shots. This nifty little plugin allows you to see a preview of page before you click the link. Mouse over here, to see what I mean. To get this for yourself visit the Snap site.

Flash 9 Motion Detection – Minority Report Style

by leon on September 24, 2007

I have been working on a Flash Based Motion Interface as a continuation of a previous project. This app, can actually detect the area of the motion and as such can be adapted for use as an interactive interface. It exploits the new Difference Mode in Flash 9. Some of the code was adapted from Web Designer Mag. Click here for a link to the page. Hope you enjoy. Don’t forget to Digg this story.

Note: The source code is coming soon, add a comment and I will give you the link to download an alpha version if your desperate!!

Thunderbird – Access Hotmail account

by leon on September 13, 2007

Do you use Thunderbird as your default mail client to check your POP accounts? Do you have a Hotmail/Windows Live Mail account? Do you wish you could use Thunderbird to check you web based mail? Well now you can. All you need to do is install the WebMail add-on, then select which service you would like to tap into. The app creates a server on your machine as a link to access the mail server. Other web based services are also available. The website is here, and you can download the files for enabling Hotmail here. To install:

  1. Open up Thunderbird.
  2. Point to Tools.
  3. Then add-ons.
  4. Click Install and browse for the Web Mail xpi first and then the Hotmail xpi.
  5. For detailed info about setting up your account click here.

At last an end to the SLOW hotmail interface and site. You now have all your emails in the same place.

Support is also available for GMail.

Use your MacBook with the lid closed

by leon on September 13, 2007

Want to use your new MacBook in clamshell mode, but don’t have an external keyboard and mouse?I figured this out last night. Don’t know if this is a known thing or not, but I was pretty psyched about it.

If you want to use an external monitor with your MacBook in “clamshell” mode, but don’t have the peripherals, here’s what to do:

1. With your MacBook on and running, plug in your external monitor and turn it on (if the monitor isn’t already on).

2. Depending on the way you have your display prefs set, you’ll either be in mirror mode or extended desktop mode. If in extended desktop mode, change to mirror mode. If in mirror mode, keep it that way.

3. Close your MacBook. The whole system (including external display will go to sleep).

4. Take any kind of USB device and plug it into the MacBook (I used an external media card reader).

5. This will wake up the external monitor and the MacBook. You should have your desktop displayed on your external monitor at it’s full resolution (as long as it’s equal to or less than the MacBook’s highest achievable resolution – I think).

6. Now, you don’t have an external keyboard and mouse, so how do you control the MacBook?

7. Well, just open the MacBook up now. The screen will stay off (and it is off, not just dimmed), but the MacBook’s keyboard and trackpad will be fully functional, controlling the pointer on the external monitor’s desktop!

GarageSale

by leon on September 13, 2007

So there I was getting ready to sell my old MacBook Ram on eBay when I came across this little gem. GarageSale is a desktop app that takes the pain out of listing your items on the eBay site. It comes with free templates and allows you to create professional and bespoke listings with ease. It now ships with GarageBuy (which is free) and this allows you to search and buy from eBay via a rather nippy desktop client. Both these products are great if you use eBay on a daily basis. The price isn’t bad (about £15). Its hardly worth finding a crack for (not that I would anyway!!).

Open source all the way

by leon on September 13, 2007

After really getting into open source apps in the last few months, i decided to compile a list of my favourite apps. If you own a Mac then you should have these installed, if not, then get clicking. Hope you enjoy:!! (there in no order)

  1. Thunderbird
  2. Firefox
  3. Adium
  4. VLC player
  5. Limewire
  6. Azureus
  7. App Delete
  8. Switch
  9. Handbrake
  10. Transmission

If there are any apps that you like, simply add a link in a reply to this post!! More apps to come soon

Synergy – Control iTunes from the task bar

by leon on September 13, 2007

Synergy is a cool little app that allows you to control iTunes from the task bar. It has full skinning for the icons and works with Growl so that you can customise how and if you are alerted when a track changes etc. At last no more switching back and forth to iTunes!!

Foxmarks – A great Firefox app.

by leon on September 13, 2007

Do you use FireFox on more than one machine? If like me you do then this app is great. Its a little add-on that syncs your bookmarks on each instance of FireFox you have installed, whether that be Windows, Mac or whatever!! This should definatly be included as standard for future releases. Keep watching for more of the best FireFox add-ons.

Silence your Mac OS X start-up sound

by leon on September 13, 2007

Finally I have found an app that will Silence your Mac OS X start-up sound (Direct Download)
Although the Mac is almost perfect, Apple decided to not include an option to turn of that horrible start up sound. This app sits in your system preferences and works a treat. This is ideal if you want to do a little ‘late night surfing’ without waking anybody up. I am using this on an Intel Mac running 10.4.10 and have found no probs yet. The app is free and developed by Arcana Research in Japan. At the moment the Intel version is a beta, but I have found no problems using it. To visit their site click here.