Texterizer Documentation


About Texterizer

Texterizer is a small flash application to create text-based "shows" from an XML file. It shows text centered in the screen for as long as you specify, then shows more text.

It was written by Adam Mathes and is under a BSD style license, which means you can do almost anything you want with it. See license.txt. for details.


Requirements

To use texterizer you need :

(An FTP program and a text editor will do.)

Installation

Unzip texterizer.zip and you will find:

  1. readme.html - this documentation
  2. texterizer.html - the HTML page that runs texterizer
  3. texterizer.swf - the Flash file
  4. texts.xml - the XML file to control texterizer

To get started with texterizer, edit texts.xml. The format is described below. When you're finished editing, open up texterizer.html in a web browser to test it. Finally, upload texterizer.html, texterizer.swf and texts.xml to your web site.


texts.xml format

A simple texts.xml file looks like this :


	<texts color="0xFF0000" font="Courier New" soundtrack="mysoundtrack.mp3" forwardurl="mynextpage.html">
		<text time="3">hi</text>
		<text time="4">you can change colors</text>
		<text time="2" color="0xFF0000">i'm red!</text>
		<text time="2.2" color="0x00FF00">i'm green!</text>
		<text time="2.5" color="0x0000FF">i'm blue!</text>
		<text time="5">i'm a multiline&lt;br;&gt;piece of text</text>
	</texts>

There is a top level <texts> element containing <text> elements.

<texts>

The top level <texts> element has the following attributes, all are optional -

soundtrack
the optional URL of a sound file to play. Example: http://yoursitenamehere.com/background.mp3
streaming
Whether to stream the soundtrack or wait until it loads entirely before playing. Valid values are 1 (for streaming) and 0 (don't stream.) The default is to stream the soundtrack.
forwardurl
The URL to redirect the browser to after the texterizer is done playing. If none is specified, no fowarding will occur.
againbutton
Whether to show a "play again" button after the animation finishes. Valid values are 0 and 1. 0 hides the button, 1 shows it. If not specified, the button will be shown by default.
color
Default color for the text. Must be in ugly RGB hex format. Example: 0x0000FF
font
Default font for the text. Example: Courier New
size
An integer specifying the default size of the text in points. Example: 15.
bold
Whether the text should be bold. Valid values are true and false. Default is false.

If you don't specify a font, color, or size, they will default to 20pt black Verdana.

<text>

Each text element will be displayed on the screen for as long as you specifiy. You can also override the default font, color, and size on a per item basis. Valid attributes of a <text> element are:

time
Required. A number specifying the number of seconds to display that piece of text. Examples: 2, 3.5, 10
font, color, size, bold
Optional. These override the default values specified at the top level.

Putting texterizer in a web page

See texterizer.html for an example of the EMBED and OBJECT and PARAM tags you need to include in your HTML.

They are reproduced here for your convenience:


	<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
	WIDTH="550" HEIGHT="400" id="texterizer" ALIGN="">

		<PARAM NAME=movie VALUE="texterizer.swf">
		<PARAM NAME=quality VALUE=high>
		<PARAM NAME=bgcolor VALUE=#FFFFFF>
		<PARAM NAME=FlashVars Value="xmlfile=texts.xml">

		<EMBED src="texterizer.swf" quality=high bgcolor=#FFFFFF  WIDTH="550" HEIGHT="400" NAME="texterizer" ALIGN=""
		TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" 
		FlashVars="xmlfile=texts.xml">
		</EMBED>

	</OBJECT>


Advanced Topics

Changing the background color

By changing the "bgcolor" attribute in the PARAMS and EMBED tags, you can change the background color of the flash animation. You must change it both for it to work.

Using an alternate XML file

You can override the default XML filename (texts.xml) to be whatever you want. In texterizer.html, look for "texts.xml" and replace it with your own filename. You need to replace it twice - once in a PARAM FlashVars tag and once in the EMBED tag.

This allows you to have one copy of texterizer.swf, but many pages and XML files for different animations.

Line Breaks

Line breaks are possible, but I currently don't recenter the text vertically for multiple lines.

Regardless, to insert a line break in your text, you need to add &lt;br&gt; where you want the break to occur. (You can also do it using real br and p tags, but only if you enclose the text in CDATA first, and that's beyond the scope of this document, and probably overkill for this.)


Contact Information

email: texterizer@adammathes.com

web: adammathes.com