- Importing QuickTime into Flash
- Adding Flash Playback Controls
- Incorporating Subtitles
- Publishing the Movie
- How It Works
Incorporating Subtitles
Because almost half of all Web users speak a language other than English, knowing how to add a simple subtitling system to video presentations is a valuable skill. It can be done with the help of a few movie clip symbols and, of course, the text itself. In this section, you use a prefabricated movie clip. The subtitle text has been laid out previously and is stored in a movie clip symbol named Subtitle Text, which is located in the Library's Subtitles Movie Clips folder.
-
Select the Subtitles layer, drag an instance of Subtitle Text onto the stage, and position it at X: 0, Y: 168.9 (see Figure 9).
Open the Instance panel and assign the Subtitle Text clip the instance name Text.
-
To achieve this, wrap Subtitle Text in another Movie Clip symbol by selecting it, clicking the Insert menu, and selecting Convert to Symbol: Movie Clip. Name the new Movie Clip Subtitles. When it appears in the Library, drag it into the Subtitles Movie Clip folder. (See Figure 10.)
Double-click Subtitles in the Library to edit it.
To begin, select the first keyframe and drag it to the second frame position. This automatically creates a blank keyframe in position 1; that frame will show by default.
Select each of the two frames, open the Frame Actions panel, and insert this code:
Return to the main timeline, select the Subtitles movie clip, and use the Instance panel to name it Subtitles.
Select the Subtitles Markers layer. Add a blank keyframe to frame 1, and then assign this code to the new keyframe on frame 1 of the Subtitles Markers layer:
Repeat Step 8 for each of the following Subtitle entries shown in Table 1 (see Figure 13). For example, for the next entry, go to frame 290 on the Subtitles Markers layer, add a blank keyframe, and assign the following code:
For the entry after that, go to frame 360 on the Subtitles layer, add a blank keyframe, and assign the following code:
Figure 9 Position an instance of the Subtitle Text movie clip on the Subtitles layer.
Naming the instance allows for the currently displayed frameand, therefore, the currently displayed subtitleto be controlled from the main timeline using Tell Target actions.
The Subtitle Text movie shouldn't always be visible because the subtitles should be turned off by default and should be able to be toggled on and off by the user.
Figure 10 Convert the Subtitle Text symbol into a movie clip named Subtitles, and then drag it into the Subtitle Move Clips folder in the Library.
Another way to allow the subtitle text to toggle is to add a blank keyframe in front of the one containing the text, and then add a stop() action to both (see Figure 11). That way, whenever the user clicks the Subtitles Toggle button, Subtitles plays to the next frame. That next frame will either be the one that does show the text or the one that doesn't.
Figure 11 Add stop() actions to both frames.
stop();
It's important to add a stop() action to both frames so that each one will "stick" when it is the currently displayed frame.
The Subtitles are now set up and can be toggled on or off (see Figure 12). But how will the right text be displayed at the right time? This is where the Subtitles Markers layer comes in.
TellTarget ("Subtitles/Text") { GotoAndStop (1); }
TellTarget ("Subtitles/Text") { GotoAndStop (2); }
TellTarget ("Subtitles/Text") { GotoAndStop (3); }
Table 1 Subtitle Frame Numbers
Frame to Select on the Subtitles Markers Layer |
Number to Assign the GotoAndStop Line |
290 |
2 |
360 |
3 |
460 |
4 |
520 |
5 |
590 |
6 |
700 |
7 |
790 |
8 |
850 |
9 |
880 |
10 |
920 |
11 |
980 |
12 |
1040 |
13 |
1090 |
14 |
1200 |
15 |
1360 |
1 |
Figure 12 The subtitles are already built into the Subtitle Text movie clip.
Figure 13 Assign the TellTarget commands to each of the indicated frames.