Flash video n' related stuff

Archive for June, 2009

Adding captioning to Dynamic Playlist example

Jun 24, 2009 Author: Lisa Larson-Kelley | Filed under: Books & Articles, Resources, Tutorials & Code

I’ve had several questions recently about how to add closed captioning to the Dynamic Playlist code in my tutorial on Adobe Developer Connection. I answered a comment on the article, but its not easy to find — so I thought I’d post it here to make it a bit easier.

Yes, this is pretty easy to implement, but is a bit nitpicky. Here’s how you do it.

Just add the URLs of the timed text files to the XML data for each video, like so:
<vid desc=”Popeye for President, Title and Credits”
ttURL=”myTTfile.xml” />

Then, in the initMediaPlayer function, you’d just add it as an additional attribute (ttURL) in the ‘for’ loop so it can be loaded for each video as it’s clicked, like this:

Add these three new lines of code at the end of the initVideoPlayer function:
myVid.autoRewind = true;
myVidCaptioning.source = tileList.selectedItem.ttURL;
myVidCaptioning.flvPlayback = myVid;

And finally, replace the listListener event handler with the following:
function listListener(event:Event):void {
myVidCaptioning.source = event.target.selectedItem.ttURL;
myVidCaptioning.showCaptions = false;
myVidCaptioning.showCaptions = true;
myVid.autoPlay = true;
The trick here is to hide then show the captions, so you clear out the data from the previously-selected video. It’s a bother, but this should take care of it.
Then, go into your FLA and drop an FLVCaptioning component onto the Stage, and give it an instance name of myVidCaptioning. Publish, and watch (and read) your videos. 🙂

Hope this helps… if you have any trouble…

download the example code here (video files omitted; you can grab them from the original tutorial files or change the XML to point to your own).

Another option, of course, is to insert embedded cuepoints into your video files for your captions, then use the onCuePoint event handler and display them in a dynamic text box. This is a more custom approach, but the timed text file approach above conforms more to usability standards. Your call. 🙂

Flashbelt: Fantastic conference, with a wake-up call

Jun 12, 2009 Author: Lisa Larson-Kelley | Filed under: Industry News, Rants & Ramblings

I had the privilege to present a session earlier this week at the FlashBelt conference in Minneapolis. It was my third year in a row being a part of this fantastic conference that is a labor of love for its organizer, Dave Schroeder. I had to leave the conference early this year, so I missed a lot of the social mixers and, most notably, the keynote that has unfortunately cast a pall on this year’s conference. (See http://bit.ly/PY4ty for all the gory details.)

Because I feel I know Dave well, and I was one of the female speakers at this conference, I feel the need to weigh in.

I’ve been speaking at tech conferences for several years now, often as one of only two or three female speakers. So I’ve experienced my share of misogyny, but also of proactive inclusiveness. I’ve had the perennial conversation with many of the conference organizers: “How do we get more women involved?!” They all say they can’t find females who are willing to stand up and speak. It is truly a chicken-and-egg problem. It stands to reason that a woman may not want to show up, let alone speak, if she feels she’ll be putting herself out there to be disrespected or objectified. It’s not easy being a woman in a field dominated by men, and in some cases, boys.

I know Hoss.  I’ve presented at conferences he’s been a part of several times. And, yes, he does seem to get a pass. “Aw, yeah, that’s just Hoss…” I’ve heard that more than once. To that point, let me share a couple of personal experiences I’ve had interacting with him.

My first encounter with Hoss was at the conference where I presented for the first time, with my female business partner. The sessions had just let out and there was a rush for the elevators. My partner and I were the last to get into a crowded elevator, and Hoss was the next in line. We squeezed back to make room for him, and he got a big grin and shouted to everyone within earshot… “Yeaaaah, I’m ridin’ with the LADIES!” and proceeded to press himself against us. We were of course disgusted and embarrassed, but as first-time speakers we didn’t want to make too much of a fuss. As women so often feel they have to do in business, we snickered and laughed it off. And just kept our distance.

The next time I crossed paths with him was a couple of weeks ago at another conference. Again, I was in an elevator, but this time I was there with my husband and 7 month old daughter. I had mentioned the previous elevator experience to my husband, so he was surprised when a quiet, respectful Hoss got in, nodded to me and smiled at our baby. We had a short conversation and he was on his way. This is the “teddy bear” Hoss that Dave refers to in his public apology, one that has a daughter of his own. (Based strictly on this interaction, who would have guessed he was on his way to show off his “orgasmatron”?)

So, yes, Dave should have been aware of the tone and content of Hoss’ presentation prior to inviting him to speak. But not for a second do I believe he would consciously condone discrimination, objectification, or abuse of a female attendee or speaker. I had to bring my daughter with me to this year’s conference and he bent over backwards to make things easy for us (you don’t see many babies at tech conferences, believe me). FlashBelt has always been the most gender-inclusive conference of its kind. I honestly believe that the reason this was sparked at THIS conference was primarily BECAUSE there were so many women in attendance. It would truly be a disservice to single out FlashBelt as “the” sexist conference. Dave has a big heart, and he just got a big lesson in trusting those who he thinks of as friends.

I tell you all this not to ratchet up the buzz, but to hopefully become part of a bigger solution. This stuff is always under the surface. The women know it; the men know it. It’s incidents like this that can raise consciousness, help trigger action and foster change. Let’s hope that’s the real take-away from this year’s FlashBelt.

If anyone has ideas to bring about a more gender-blind Flash community, please bring ‘em on. It’s 2009, already!

Thanks to everyone who chose to attend my FMS talk at FlashBelt this year instead of sneaking next door to see Grant Skinner! 🙂

I hope you all got something useful from the session, and really did walk away feeling empowered to take the dive into FMS development.

As promised, here are the slides and files from the presentation. Please let me know if you have any questions I didn’t answer.

SLIDES (PDF, sorry about the large file size)


Special thanks to the fantastic Influxis team for their great blog posts and examples on both DVR and Dynamic Streaming. (If you need FMS hosting, you’ll want to call these guys. Seriously.)

And kudos also to David Hassoun for his comprehensive articles and sample code (most of which I relied on heavily in my presentation).

Thanks again, and see you next year, Minneapolis!


Adobe Community Professional Author, speaker, developer, geek, mom.

Flash Video for Professionals book
Our book, Flash Video for Professionals, is now shipping! This is the book we always wanted to have by our side when developing Flash Video applications. It takes a holistic approach -- from concept, to client interaction, to application architecture. With code examples in AS2 and AS3, you can get started right away (and ease your transition from one version to another). We cover all aspects of Flash video including encoding, using the components, creating your own custom players, filters and transitions, buffering issues, hosting choices, and more.
Buy on Amazon »
Book Source Files, Etc. »