Using HTML in Director

I spent sometime working with putting HTML formatted text into a Director field. First step is to format the text into HTML code and put it into a “field” member or a varible. Then make the “html” of a “text” member have the text of the field.

I have found that I needed to fill the “Text” member with html formatted text when the movie starts; otherwise, it didn’t always work and was frustrating to figure out why.

Example using a variable.

htmltext = “<html><body bgcolor=’ffffff’>”
put “<table width=’685′ border=’0′ cellpadding=’3′>” after htmltext

put “<tr ><td width=’75’><font color=’#000000′ size=” face=’Verdana, Arial, Helvetica, sans-serif’>TD #1</font></td>\
<td width=’70’><font color=’#000000′ size=’3′ face=’Verdana, Arial, Helvetica, sans-serif’>TD #2</font></td>\
<td width=’70’><font color=’#000000′ size=’2′ face=’Verdana, Arial, Helvetica, sans-serif’>TD #3</font></td>\
<td width=’450′><fontĀ  size=’2′ face=’Verdana, Arial, Helvetica, sans-serif’><a href=’somelink’>Da Link</a></font></td>\
</tr>” after htmltext

put “</table></body></html>” after htmltext

member(“show text”).html = htmltext

This entry was posted in Director. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *