Home -> VRSmarty plugins page -> dialog.swf
This plugin is completely free for use in any context or connection.
dialog.swf
Use this plugin to display a dialog box where the viewer can enter a choice.
The box can show a text prompt with one or two response buttons.

The following parameters are supported:

In VRSmarty xml file:
texttext=Do you want to go view images?text message
boxWidthboxWidth="250"width of dialog box - wider texts wrap
closeButtoncloseButton="0"show dialog close button, default=1
button1Labelbutton1Label="Yes, please!"Left button label
button2Labelbutton2Label="No thanks!"Right button label
onClick1onClick1="showImages"left button onClick command
onClick2onClick2="panToPos3"right button onClick command
bgColorbgColor="#000000"background color RGB value, default "#C0C0C0"
borderColorborderColor="#000000"border color RGB value, default "#000000"
textFonttextFont="Garamond"text font family, default "Arial"
textSizetextSize="16"text font size, default 14
textColortextColor="#FFFFFF"text color RGB value, default "#000000"
textAligntextAlign="left"left, center or right, default center
textBoldtextBold="1"1 or 0, default 0



Plugin attributes:set with spot_id.content.name=value

All the attributes above can be modified dynamically.


Plugin methods: call with spot_id.content.name(arguments)
prompt('text','button1label','button2label')display a text prompt with two buttons
prompt('text','button1label')display a text prompt with one button
prompt('text')display a text prompt with no buttons
prompt()display the box as configured earlier



NOTES:
The box will not be displayed until the prompt() command has been received, and will be visible until a button has been clicked.


Certain characters like < " cannot be used directly in the text, because they have special meaning in an XML file. They can however be included in the text by using the escape-coded forms (%3C, %22...).

Also, "\n" or "\r" can be used to force newline in the text.




Version history: