Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Creating a closed captioning button in Flash/AS2

Posted on 2011-10-20
10
Medium Priority
?
430 Views
Last Modified: 2012-05-12
Hello -

I'm using Flash CS5 on a Mac and ActionScript 2.0 (I have to use this language because the software I need to import the SWF to only supports AS2).

I need to create a "closed captioning" button in my .fla file.  I am NOT looking to control a Flash video with this button.  I NEED to place it on the timeline with the "rewind" and "pause/play" buttons I have created that control the movieclips on the timeline.

I have a few audio files and would like the CC button to scroll the words/sentences spoken on the bottom of the screen.  I then will publish my file as a SWF and use software (Articulate) to publish it to my LMS.

Any help would be greatly appreciated.
0
Comment
Question by:DEPAdmin
  • 4
  • 4
9 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 37010290
I am still cannot understand what do you want?
Creating button or stream audio?
 
"I have created that control the movieclips on the timeline. " Did you embed an audio into timeframes?

The best if you will share your FLA file but you need to save as CS4 and attach to this post
0
 

Author Comment

by:DEPAdmin
ID: 37026283
I need to create a closed captioning button.  

I currently have a "pause/play" button on the timeline of each movieclip that controls it.  In each movieclip I have an audio file on the timeline that plays.  I'd like to add a closed captioning button next to the "play/pause" button in each movie clip so that the words spoken in the audio will show up on the screen (preferably 1-2 lines at a time).

I have attached the CS4 file.  There are 3 movieclips located on the main timeline (layer labeled "mcs/txt").  Within each movieclip's timeline you'll see an "audio" layer that contains the MP3 file, and a "controls" layer that contains the "play/pause" button.
Definitions-CS4.fla
0
 
LVL 29

Expert Comment

by:dgofman
ID: 37054965
Sorry, I was busy do you still need a help?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:DEPAdmin
ID: 37056610
Yes I do, I'm still lost in how to do this lol.  Thank you.
0
 
LVL 29

Expert Comment

by:dgofman
ID: 37058403
What do you mean?

 I'd like to add a closed captioning button next to the "play/pause" button in each movie clip so that the words spoken in the audio will show up on the screen (preferably 1-2 lines at a time).

Do you want subtitles?

1)      Your audio embedded into timeline, you can add one more layer and add text and mark as read word corresponding your audio frame (like karaoke)
2)      Create an XML file with words and timeline index. Now before to start playing a movie you have to load this function, parse and check indexes.
Example

<movie1>
   <w frame=”5”>Let’s</w>
  <w frame=”15”>defined</w>
 <w frame=”30”>the terms</w>
Etc.
0
 

Author Comment

by:DEPAdmin
ID: 37058990
Yes, I guess you can call them subtitles.

How would you add text and mark as read word corresponding to audio?  I thought I'd have to add in another layer and type some text to show up that would fade in and out in conjunction with the audio.  I was actually wondering if I can create a Closed Captioning button that could toggle that layer on/off to show or hide the text from appearing on the screen.

I've heard of XML, but I'm unfamiliar with it.  I've only done some AS3/AS2 coding in Flash.  Is this complicated to learn?
0
 
LVL 29

Accepted Solution

by:
dgofman earned 2000 total points
ID: 37059661
No, using XML it's not difficult in ActionScript, but easier using in AS3.

Any ways if you will use my second suggestion you will able to handle show or hide subtitles.
Displaying word frames add into onEnterFrame handler function there you will able to set test to empty is user click on hide button.

    onEnterFrame=function(){
        text.text = (showTitles.selected ? words.childNodes[this._currentframe] ? “”;
    }


http://tiffanybbrown.com/2006/07/18/parsing-xml-using-flash-and-actionscript-20/



0
 

Author Comment

by:DEPAdmin
ID: 37062585
I would prefer to use AS3 also, however, the program I need to publish the .swf files in can only handle AS2 :/

Thanks for your help, I'll definitely check this out and get back to you.  I'm also going to look at some XML tutorials on Lynda.com since I'm clueless about this technique.
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37337174
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Suggested Courses
Course of the Month20 days, 22 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question