Home -> VRSmarty plugins page -> textbox.swf
This plugin is completely free for use in any context or connection.
textbox.swf
VRSmarty hotspot plugin for showing a text box.
The text content as well as most visual attributes can be changed at any time.

The following parameters are supported:

In VRSmarty xml file:

boxWidth boxWidth="275"
boxWidth="35%"
use together with wordWrap="true" to disable width autosizing
width in percentage of pano width
 
text text="Press Me"
text="#nn"
text="*spotID.attr"
text content
numbered text read by plugin "texts.swf"
text from attribute "attr" in hotspot with id="spotID"
 or
textFiletextFile="..."read text content from file
 
borderColorborderColor="#0000FF"border color, default no border
wordWrapwordWrap="true"default false, use with boxWidth, see NOTES
selectableselectable="true"makes the text selectable
 
fontfont="Garamond"font name, default "Arial"
sizesize="11"font size, default 10
textColortextColor="#0000FF"font color, default "#000000"
bgColorbgColor="#CCCCFF"background color, default transparent
boldbold="true"default false
italicitalic="true"default false
underlineunderline="true"default false
marginmargin="10"left and right margins width, default 0
textAligntextAlign="center""left", "right", "center" or "justify", default "left"
leadingleading="5"extra line height, default=0


All attributes can be changed at any time with a VRSmarty command: "spot_id.content.name=value;".



NOTES:
For a simple autosizing text sign, you don't have to specify the boxWidth="nnn" attribute. But if you for example want to have a number of equal sized text buttons, then you have to set both boxWidth AND wordWrap.


If you have a larger text block, it might be easier to store the text in a separate file, which can be loaded by using the attribute textFile="...". In that case the text="..." attribute will be ignored. A new text can be loaded at any time by using the command spot_id.content.text="..." or spot_id.content.textFile="...".


You can also use the numbered texts option (text=#nn"). The file containing the numbered texts is then loaded by the texts.swf plugin. This plugin will then pass the number to texts.swf and get the corresponding text string in return.


The text is always unescaped before it is displayed. That means you can write all characters and signs in their escaped form (,=%2C, ;=%3B, &=%26 ...). A newline character can also be written as \n.



Example text spot:

<spot id="text2" style="text1" staticAlign="TL" align="TL" staticX="15" staticY="140"
   mouseChildren="true" buttonMode="false"
   boxWidth="600" wordWrap="true"
   font="Courier New" textSize="16" bold="false"
   textColor="#0000A0" bgColor="#FFFFFF" borderColor="#000000" selectable="true" 
   text="This box has a fixed width, selectable text"
/>
					



Version history:
1.0.1:
Fixed error when text string begins with "#".