Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

How to Use the Play List XML File

How to Use the Play List XML File

Before you get nervous, remember that XML files are just text files. You can edit them in Notepad, WordPad, Microsoft Word, or any other text editor. I prefer Macromedia Dreamweaver because it color codes my XML nodes, aiding readability. The following is the XML file in Dreamweaver:

<?xml version="1.0" encoding="iso-8859-1"? >
<captivate_playlist
autoplay="true"
"volume="50"
content="true">
<swf src="demonstration1.swf" name="Introduction">
<swf src="demonstration2.swf" name="How To Do">
<swf src="demonstration3.swf" name="Conclusion">
</captivate_playlist>
</xml>

When CaptivatePlayer uses the XML file excerpted in Figure 8, CaptivatePlayer performs the following actions:

  • Automatically starts playing the first SWF file
  • Sets the volume to 50%
  • Scales the Captivate SWF file to fit to the size the CaptivatePlayer
  • Puts demonstration1.swf, demonstration2.swf, and demonstration3.swf into the menu, but uses the names Introduction, How To Do, and Conclusion

Listed below are the options for each of the attributes.

Attributes for the captivate_playlist tag Value
autoplay true or false. Defaults to “true.”
volume 0-100
scalecontent true or false. Defaults to “true.”

In the code sample above, the SWF source tag has a specified name attribute. You could have used the SWF file name, but “Introduction” is more intuitive to the user than demonstration1.swf. If you want to add more Captivate SWF files, you simply add another SWF tag in the XML file, just like the examples provided. You can add as many SWF tags as you like, but you must have at least one SWF tag always present.

Comments