Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

looking for ideas to show subtitles while sound is playing

Status
Not open for further replies.

fiuPikeOY

Programmer
Jun 14, 2004
143
US
Hello,

Does anybody have any ideas on how to show subtitles while a narrator's sound is played. reading the text dynamically from a text field or something. I only have space to display about 2 lines at a time.

Any ideas?

Thank you
 
If it's a timeline based sound, I would probably store all of the text in separate variables at the beginning of the movie.

Code:
i = 1;
subtitle1 = " Mr. Martin bought the pack of Camels on Monday";
subtitle2 = "night in the most crowded cigar store on Broadway.";
subtitle3 = "It was theatre time and seven or eight men";
subtitle4 = "were buying cigarettes.";

Then on the timeline with the sound, cue each subtitle when you need it (displaying it in a dynamic textfield):

Code:
textDisplay.text = eval("subtitle"+i);
i++;

If you need to clear the field for a pause in the narration, go:

Code:
textDisplay.text = "";

Something like that should do.

frozenpeas
 
Sound's Sync should be set to "stream"... Then based on the sound's modulations for cues, simply set a textfield's text or variable on the appropriate starting frame until the next cue...

subtitle.text = "whatever text...";
//or...
subtitle_var = "some other text...";



Regards. Affiliate Program - Web Hosting - Web Design
After 25,000 posts, banned on FK, but proud not to have bowed down to them!
 
Spreading the text across the timeline like that will be more cumbersome to manage if changes need to be made. With the idea I posted, I was trying to store all the text in one place. Both work fine, depends what you're after.

frozenpeas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top