Techniques for implementing line breaks in LOTE learning objects

This document describes how to avoid unwanted line-breaks when Non-English text is imported into Flash.

What are the potential issues?

There is a potential issue regarding Flash inserting unwanted line-breaks in Non-English text. The issue occurs when Non-English text is imported into Flash from an XML file and Flash inserts line-breaks in the middle of words.

The issue appears to relate to Flash's parsing of the XML.

Why would I want to use this technique?

This technique prevents Non-English text from being split mid-word by line-breaks.

How to implement this technique

The solution has two components:

  1. manually formatting imported XML text with line-breaks, and
  2. increasing the size of dynamic text fields.

Manually inserting line-breaks in XML

Using CDATA tags specify where you would like line-breaks to happen. For example,


<english>
  <![CDATA[You're not ready to<br>fly the kite yet! You have<br>some things to do first.]]>
</english>

Break ('<br>') tags are being used in this example as the text is being rendered in Flash as HTML text.

Increasing the size of dynamic text fields

In Flash MX it appears that dynamic text fields need to be increased in size to avoid Flash automatically wrapping words in undesirable positions.

The fix involves extending the text box area to be greater than what is visually required. There is no definitive measurement on how much to extend the text area, but allowing an extra 20% seems to work in most cases.