Instructions for creating a Flash video player with subtitles

Download the Video Player Open the earthquake.xml file and make the following changes:
  • Where it says uri="earthquake.flv" write in the name of your flv video file. File names should not include apostrophes, blank spaces or foreign characters. If the video is in a different folder or on a different server write in the absolute url. If it's in the same folder as the flash and xml files, writing the name of the video file will do.
  • Where it says duration="57.5" write in the duration of the video in seconds. For example, if the video lasts two minutes and ten seconds, you would write duration="130".
  • For each cuepoint write in the time at which it should appear (in seconds), for example, if you want the cuepoint to appear after one minute and 15 seconds you would write sec="75".
  • For each cuepoint replace the text between the CDATA tags with the text you want to appear. Make sure you leave the brackets in the CDATA tags intact.
  • Where it says item ident='earthquake.xml' replace the name with the name you want to give your xml file and save the file as a text file with an xml extension. File names should not include apostrophes, blank spaces or foreign characters. IMPORTANT: Make sure you choose UTF-8 under encoding. Notepad and Textpad provide this option. Other text editors may not.
If you are worried about messing up the xml code, you can use the Subtitles Generator to create the xml file instead of doing it manually. The generator also provides a window for viewing the video while adding the subtitles, in order to make it easier to create the cuepoints. Open the video_player.html file and make the following changes:
  • Where it says data="video_player.swf?files=earthquake.xml" and name="FlashVars" value="files=earthquake.xml" replace the name of the xml file with the name of your file. If you want the video player to play more than one video, you can add additional videos to this parameter, separated by commas, as follows: files=earthquake.xml,roof_collapse.xml,adamson.xml. If you choose to do this, a series of numbered buttons will appear under the video controls so students can select the video they want to watch.
  • Select the code between the object tags and paste it into your activity.
Upload the following files to your server:
  • video_player.swf
  • your flv video file(s)
  • one xml file for each video
  • the html file(s) with the embedded object tag
If your xml file does not load correctly, check to see whether...
  • ...the xml is well-formed (open the xml file in your browser, if there is an error in the xml you will be able to see which line it is in and correct it)
  • ...the xml file has been saved as UTF-8
  • ...the xml file is in the same folder as the html file and the swf file
It is strongly advised that you put the swf and xml files in the same folder as your html file. If you don't you will have to add a BASE parameter to the object tag.