|
The CGI control (a subclass of the Text control) manages communication
with a CGI script
on the server. It provides a general purpose 'form' mechanism that includes both file upload and
download, as well as enabling the posting of XML formatted mash data.
This control is most commonly used to create a 'save' button, which posts the XML data associated
with the current mash to the CGI specified in its url attribute. In order for the
Mash XML Syntax and clip tags that make up the mash to be included in
the request, the mash attribute must point to an active mash like 'player.mash'.
The referenced mediaand font option tags can also be included in the request by setting the media attribute to '1' as well. This
generates what might be called a 'fat' mash - a self contained file that can be displayed in a
simple player.
Learn more in Mash Saving.
The control can also be used to create more generic forms, though the total amount of data that can
be passed to the CGI script is limited because parameters are sent via the GET method. To use this
approach the url attribute is dynamically populated with values from other controls in
the interface, or from the CGI control itself which supports binding to arbitrary properties.
Regardless of how the CGI control is initially configured, it can be partially reconfigured based on
the response it receives from the server side script. For instance, a javascript alert could be displayed
by returning a tag with its get attribute set to 'javascript:alert("Hello world!");'.
Or the Player could be activated by setting the trigger attribute to 'player.play'
and the value attribute to '1'.
If the response contains a url or upload attribute it will be requested without further user
interaction. A delay attribute can also be specified so the requests can be staggered if
needed. This mechanism allows one CGI script to trigger another and another, so a single process can
span over consecutive requests. This is useful for tracking asyncronous server tasks like processing
of media files after uploading. The control also supports the progress and
status attributes, which can be bound to a Slider and Textcontrol for visual feedback.
Attributes align: the string 'top', 'left' or 'center'
angle: floating point number (degrees)
bind: an object ID, period and property name
border: positive integer (pixels)
bordercolor: six character hex color value
color: six character hex color value
config: url to a configuration file with a moviemasher tag
disicon: valid URL to a graphic
disable: an object ID, period and property name followed by a condition and value
download: valid CGI or file URL
downloadname: valid file name, with extension
font: valid font id
forecolor: six character hex color value
get: valid URL
grad: floating point number less than 128
hide: an object ID, period and property name followed by a condition and value
height: integer (pixels) or '*', '**'... (proportional)
icon: valid URL to a graphic
overicon: valid URL to a graphic
pattern: a valid string with curly braced property names
select: an object ID, period and property name followed by a condition and value
symbol: a valid SWF URL, followed by an ampersand and class name
text: any string
textalign: the string 'left', 'right' or 'center'
textsize: positive integer (pixels)
upload: valid CGI URL
uploadname: valid POST parameter name
width: integer (pixels) or '*', '**'... (proportional)
|