Table of Contents

 

7.2 ASP.NET Interface Reference
 
This section describes the commands available on the ASP.NET interface to Turbine 7.

 

 

 

Initial Scripts

We suggest using this skeleton for starting your ASP.NET VB scripts:

<%@ Page language="vb" %>
<%
' create the Turbine object:
Dim Turbine As Turbine.Turbine7 = New Turbine.Turbine7()
 
' assign a variable:
Turbine.Variable("name") = "some text"
 
' load a DataSet file or access a database and insert the data into Turbine - for example: Turbine.LoadDataSet "location","DataSetName"
 
' load a Flash or MML template:
Turbine.Load("template.swf")
 
' now generate the media to the web browser
Turbine.GenerateFlash
' alternatively we could generate a PDF document:
' Turbine.GeneratePDF

 
%>

For ASP.NET C# development we suggest starting with the following script:

<%@ Page language="c#" %>
<%
// create the Turbine object:
Turbine.Turbine7 Turbine = new Turbine.Turbine7();

// assign a variable:
Turbine.Variable["name"] = "some text";

// load a DataSet file or access a database and insert the data into Turbine - for example: Turbine.LoadDataSet("location", "DataSetName");

// load a Flash or MML template:
Turbine.Load("template.swf");

// now generate the movie to the web browser
Turbine.GenerateFlash();
// alternatively we could generate a PDF document:
// Turbine.GeneratePDF();

%>

 


Alphabetical List

 


Commands

 

AddDataSetRow Command

Description

Insert a row into a DataSet created by the MakeDataSet command.

Syntax

[C#]
bool AddDataSetRow(String* dataSetRow);

dataSetRow is a coma-separated list of values to be assigned to respective DataSet columns.

Return Values/Errors

Returns true if no errors occurred.
 
DataSetRow parameter must be a comma-separated list of values
The specified row must be a comma separated list of values.

Remarks

Use this command to insert values into an existing DataSet.

 

 

AddDataSetColumn Command

Description

Insert a DataSet column starting at a specified row.

Syntax

[C#]
bool AddDataSetColumn(String* dataSetName, String* columnName, int startRowNumber, String* values);

dataSetName is the name of the DataSet to define.
columnName is the name of an existing or new DataSet column.
startRowNumber is the number of a new or existing DataSet row where to start placing the column values.
values is a comma separated list of values to place on successive rows.

Return Values/Errors

Returns true if no errors occurred.
 
Values parameter must be a comma-separated list of values
The specified values must be a comma separated list of values.

Remarks

Use this command to insert columns into an existing DataSet.

 

 

AddDataSetValue Command

Description

Insert a DataSet entry on a specified column and row.

Syntax

[C#]
bool AddDataSetValue(String* dataSetName, String* columnName, int rowNumber, String* value);

dataSetName is the name of the DataSet to define.
columnName is the name of an existing or new DataSet column.
RowNumber is the number of a new or existing DataSet row.
value is the value to be insert into the DataSet.

Return Values/Errors

Returns true if no errors occurred.
 
Error setting value
An error occurred when setting the value. Check if the DataSet already exists.

Remarks

Use this command to insert a value into an existing DataSet.

 

 

Cache Command

Description

Cache or serve from cache the current media, uniquely identified by the script URL (including query string) and media type.

Syntax

[C#]
bool Cache(String* expires [, String* mediaType]);

expires is the expiration date for the movie with the format YYYYMMDDHHMISS.
mediaType is the media format outputted by Turbine. Currently "flash" for Macromedia Flash and "pdf" for Adobe PDF are available. The default value is "flash" if not provided.

Return Values/Errors

Returns true if no errors occurred.

Error serving movie
An error occurred when serving the media.
 
The expires parameter has bad format
Check the expires parameter format. It should be YYYYMMDDHHMISS.
 
Error preparing to cache media
An error occurred when caching the media.

 

 

CacheMedia Command

Description

Add the generated media to the cache, identified by the given reference.

Syntax

[C#]
bool CacheMedia(String* reference, String* expires [, String* mediaType]);

reference is the unique id for the cached media.
expires
is the expiration date for the media with the format YYYYMMDDHHMISS.
mediaType is the media format outputted by Turbine. Currently "flash" for Macromedia Flash and "pdf" fo Adobe PDF are available. The default value is "flash" if not provided.

Return Values/Errors

Returns true if no errors occurred.
 
The expires parameter has bad format
Check the expires parameter format. It should be YYYYMMDDHHMISS.
 
Error preparing to cache media
An error occurred when caching the media.

Remarks

The old command CacheMovie can still be used, but we recommend that you use the CacheMedia command instead.

 

 

Create Command

Description

Creates a media instance from the provided MML.

Syntax

[C#]
bool Create(String* mmlTags [, String* instanceName]);

mmlTags is a MML string to be interpreted and included into the media.
instanceName
is the name of the instance created inside the media for later reference. By default, Turbine assumes an unique name if no value is provided.

Return Values/Errors

Returns true if no errors occurred.
 
Out of memory
Memory allocation error. Is your system running out of virtual memory?

Remarks

There are no restrictions about the MML provided to this command - you can do everything possible in MML with this simple command.

 

 

DataSetFromDataSet Command

Description

Creates a Turbine DataSet from an ADO.NET DataSet object.

Syntax

[C#]
bool DataSetFromDataSet(System::Data::DataSet* dotNetDataSet);

dotNetDataSet is the DataSet to be imported into Turbine.

Return Values/Errors

Returns true if no errors occurred.

No errors are raised by this command.

Remarks

All the DataTables and DataViews contained in the DataSet will be imported into Turbine. The destination Turbine DataSet names will be the names of the corresponding DataTable names.

 

 

DataSetFromDataTable Command

Description

Creates a Turbine DataSet from an ADO.NET DataTable object.

Syntax

[C#]
bool DataSetFromDataTable(System::Data::DataTable* dataTable [, String* dataSetName]);

dataTable is the DataTable to be imported into Turbine.
dataSetName is the name of the Turbine DataSet into which the ADO.NET DataTable will be imported. By default is assumed the dataTable.TableName property.

Return Values/Errors

Returns true if no errors occurred.

No errors are raised by this command.

 

 

DataSetFromDataView Command

Description

Creates a Turbine DataSet from an ADO.NET DataView object.

Syntax

[C#]
bool DataSetFromDataTable(System::Data::DataView* dataView [, String* dataSetName]);

dataView is the DataView to be imported into Turbine.
dataSetName is the name of the Turbine DataSet into which the ADO.NET DataView will be imported. By default is assumed the dataView.Table.TableName property.

Return Values/Errors

Returns true if no errors occurred.

No errors are raised by this command.

 

 

DataSetFromString Command

Description

Create a DataSet from a string formatted as a DataSet file or from a well-formed XML string.

Syntax

[C#]
bool DataSetFromString(String* string, String* dataSetName [, String* rowTag, String* columnTags]);

string is an well-formed XML string to be parsed into a Turbine DataSet or is a string containing a DataSet definition, on the format of a DataSet File.
dataSetName
is the name of the Turbine DataSet to create.
rowTag is the name of the XML tag to use to start a new DataSet Row - it must be a non empty tag, with other tags inside, to be used for the rows.
columnTags is a comma separated list of tags and/or tag parameters to use (once parsing inside a rowTag tag) to create DataSet columns. Check remarks to see variations on using this parameter.

Return Values/Errors

Returns true if no errors occurred.
 
DataSet string has bad format
The string is not well formatted. It must be formatted according to a DataSet file.
 
DataSet XML string has bad format
The string is not well formatted. It must be valid XML.

Remarks

If rowTag and columnTags parameters are defined then Turbine assumes that the format os the string passed is XML formatted. It assumes the format of DataSet file otherwise.

The XMLDataSetFromString command is still valid although we recommend that you use the DataSetFromString command instead.

The columnTag parameter can be specified in a few different ways to allow different parsing of the XML document:

columnTags Effect
"" (empty) The text immediately after the start of each rowTag will be used for the only column in the DataSet, this column will be named after the rowTag name
"tag1, tag2, tag3,..". The DataSet will feature the specified columns, composed by the text immediately inside each of these tags, for each rowTag
"tag1#attr1, tag2#attr2"

Each tag marked with an hash will contribute with the text of the attr1 or attr2 attribute inside the respective tag, for example:
<tag1 attr1="some"/> <tag2 attr2="times"/>
would use the text "some" and "times" for successive columns inside the created DataSet. The created DataSet columns would be called "tag1#attr2" and "tag2#attr2"

"tag1#attr1=alias1, tag2#attr2=alias2" Just like the above, but the columns will be defined on the DataSet with the column name specified in alias1 and alias2. This is important for some commands that depend on column names like the AutoImage or AutoMovieClip

XML entity references like &amp; and &gt; will be accordingly expanded on the read values.

Equivalent MML

The MML equivalent to this command is <DataSet>

 

 

Generate Command

Description

After all the content has been defined, it's time to actually generate the media and send it into the web browser.

Syntax

[C#]
bool Generate([String* mediaType]);

mediaType is the media format outputted by Turbine. Currently "flash" for Macromedia Flash and "pdf" for Adobe PDF are available. The default value is "flash" if not provided.

Return Values/Errors

Returns true if no errors occurred.
 
Out of memory generating media
Memory allocation error while generating the file. Is your system running out of virtual memory?
 
Could not include debug window
The Turbine Window could not be found.
 
Error generating media
There was an error generating media.

 

 

GenerateFlash Command

Description

After all the content has been defined, it's time to actually generate the Flash movie and send it into the web browser.

Syntax

[C#]
bool GenerateFlash();

Return Values/Errors

Returns true if no errors occurred.
 
Out of memory generating media
Memory allocation error while generating the file. Is your system running out of virtual memory?
 
Could not include debug window
The Turbine Window could not be found.
 
Error generating media
There was an error generating Flash.

Remarks

This is a convenience command, equivalent of calling the command Generate with "flash" as its only argument.

 

 

GenerateHTMLFirst Command

Description

Generate an HTML page with the HTML plug-in to embed the generated media. This page will in turn load the generated media.

Syntax

[C#]
bool GenerateHTMLFirst([String* pluginHTMLPage]);

plugin_html_page is the path to an HTML page with the media plug-in. The default value is the HTML file "flashplugin.htm" located on the Turbine installation directory.
Optionally this argument can be interpreted as a media type, and as such it can be "pdf" or "flash". In this case the default HTML page for the specified media will be used.

Return Values/Errors

Could not open the HTML plugin page
The specified HTML plug-in page could not be found.

Remarks

The GenerateHTMLFirst command detects if the request is the first for this Flash movie and if so generates an HTML plug-in page that in turn loads the requested Flash Movie.
If an HTML plug-in page is not supplied then the default "flashplugin.htm" file, on the Turbine installation directory is used instead.
The HTML plug-in page can use Turbine variables, as they will be expanded accordingly. For a good example, please check the supplied default "flashplugin.htm" file.
Please note that to use variables like {Media.Color} or {Media.Width}, this command should only be issued after one or more Turbine.Load commands are executed, or they will not be defined.

 

 

GenerateToFile Command

Description

Assemble the Flash template and save the resulting media into a local file.

Syntax

[C#]
bool GenerateToFile(String* filename [, String* mediaType]);

filename is the relative or absolute location of the file to save.
mediaType
is the media format outputted by Turbine. Currently "flash" for Macromedia Flash and "pdf" for Adobe PDF are available. The default value is "flash" if not provided.

Return Values/Errors

Out of memory generating media file
Memory allocation error while generating the file. Is your system running out of virtual memory?
 
Could not save file
Could not create or overwrite the destination file. Check the directory/file permissions, and if they're compatible with the running IIS user account.
 
Error generating media to file
Could not create or overwrite the destination file. Check the directory/file permissions, and if they're compatible with the running IIS user account.

 

 

GeneratePDF Command

Description

After all the content has been defined, it's time to actually generate the PDF document and send it into the web browser.

Syntax

[C#]
bool GeneratePDF();

Return Values/Errors

Out of memory generating PDF
Memory allocation error while generating the file. Is your system running out of virtual memory?
 
Could not include debug window
The Turbine Window could not be found.
 
Error generating PDF
There was an error generating PDF.

Remarks

This is a convenience command, equivalent of calling the command Generate with "pdf" as its only argument.

 

GetDataSetColumnCount Command

Description

Gets the number of columns associated with a given DataSet.

Syntax

[C#]
int GetDataSetColumnCount(String* dataSetName);

dataSetName is the name of the DataSet to get the number of columns.

Return Values/Errors

Returns the number of columns of the DataSet.
 
DataSet not found
The given DataSet was not found.

 

 

GetDataSetRowCount Command

Description

Gets the number of rows associated with a given DataSet.

Syntax

[C#]
int GetDataSetRowCount(String* dataSetName);

dataSetName is the name of the DataSet to get the number of rows.

Return Values/Errors

Returns the number of rows of the DataSet.
 
DataSet not found
The given DataSet was not found.

 

 

GetDataSetValue Command

Description

Fetches the value of a DataSet cell at the given column and row.

Syntax

[C#]
int GetDataSetValue(String* dataSetName, String* columnName, int rowNumber);

dataSetName is the name of the DataSet to get the number of rows.
columnName is the name of the DataSet column where the value is located.
rowNumber is the row number for the value.

Return Values/Errors

Returns the value at the specified DataSet cell.
 
Could not retrieve DataSet value
The DataSet does not exist or the specified cell is not defined.

 

 

HTTPGet Command

Description

Fetch an HTTP URL and returns the result formatted as a String.

Syntax

[C#]
String* HTTPGet(String* httpUrl);

httpUrl might be an absolute(normal) HTTP URL or a relative (to the current script). Relative URLs are in the form http://./relative_location

Return Values/Errors

Returns the result of the get in String format.
 
Could not access http URL
The URL is not available
.
 
The http URL has a bad format
Check the syntax of your URL.

Remarks

Useful to fetch HTML pages or CGI results from other servers.

 

 

HTTPGetArray Command [.NET interface only]

Description

Fetch an HTTP URL and returns the result formatted as an Array.

Syntax

[C#]
Array* HTTPGet(String* httpUrl);

httpUrl might be an absolute(normal) HTTP URL or a relative (to the current script). Relative URLs are in the form http://./relative_location

Return Values/Errors

Returns the result of the get in Array format.
 
Could not access http URL
The URL is not available
.
 
The http URL has a bad format
Check the syntax of your URL.

Remarks

It is useful for situations where the fetched content is not text for example for images.

 

IEOptimize Command

Description

Avoid Internet Explorer multiple request problem.

Syntax

[C#]
bool IEOptimize();

Return Values/Errors

Returns true if no errors occurred.

No errors are raised by this command.

Remarks

Must not be used on the same script as the GenerateHTMLFirst command.

 

  

Include Command

Description

Includes a media file into Turbine. The media file can be a Macromedia Flash file or a MML file.

Syntax

[C#]
bool Include(String* location);

location is an absolute or relative filename or a URI pointing to the file to include.

Return Values/Errors

Returns true if no errors occurred.
 
Could not access media or template
The location specified could not be found.
 
Could not load media or template
The file was found but it could not be read.

Remarks

This command includes the media but does not issue place for its elements. This is useful for including libraries of components for later instantiation.

Equivalent MML

The MML equivalent to this command is <Include>

 

 

InjectData Command

Description

Injects data into an instance of a Flash component.

Syntax

[C#]
bool InjectData(String* dataSetName, String* instanceName [, String* id]);

dataSetName is the Turbine DataSet to inject into the Flash component.
instanceName is the instance of the Flash component into which to inject data.
id is the id of the Flash component. It may be necessary if Turbine can't figure out the id by the instanceName argument.

Return Values/Errors

Returns true if no errors occurred.
 
Out of memory
Memory allocation error. Is your system running out of virtual memory?

Equivalent MML

The MML equivalent to this command is <InjectData>

 

 

Load Command

Description

Loads a media file into Turbine. The media file can be a Macromedia Flash .swf file or an MML file.

Syntax

[C#]
bool Load(String* location [, String* instanceName]);

location is an absolute or relative filename or a URI pointing to the file to load.
instanceName is the name of the instance created inside the media for later reference. By default, Turbine assumes an unique name if no value is provided.

Return Values/Errors

Returns true if no errors occurred.
 
Could not access media or template
The location specified could not be found.
 
Could not load media or template
The file was found but it could not be read.

Remarks

This command loads and displays the external media - it should be used to load a single template file - to load multiple external files it's preferable to use an MML block with a series of MML <MovieClip> tags, which avoids any confusions with the relative depths at which the loaded media appears.

Equivalent MML

The MML equivalent to a <MovieClip> command with the src parameter.

 

 

LoadDataSet Command

Description

Load a Turbine DataSet from a local file or HTTP location.

Syntax

[C#]
bool LoadDataSet(String* location, String* dataSetName [, String* rowTag, String* columnTags]);

location is the absolute or relative local path, or HTTP location of the file.
dataSetName
is the name of the Turbine DataSet to create.
rowTag is the name of the XML tag to use to start a new DataSet Row - it must be a non empty tag, with other tags inside, to be used for the rows.
columnTags is a comma separated list of tags and/or tag parameters to use (once parsing inside a rowTag tag) to create DataSet columns. Check remarks to see variations on using this parameter.

Return Values/Errors

Returns true if no errors occurred.
 
Could not access DataSet file
The location specified for the DataSet file can not be reached.
 
DataSet file has bad format

Check the contents of your file to make sure they are in the right format
.
 
Could not access DataSet XML file
The location specified for the XML file can not be reached.
 
DataSet XML file has bad format
Check the contents of your file to make sure they are in the right format.

Remarks

If rowTag and columnTags parameters are defined then Turbine assumes that the the file is XML formatted. It assumes the format of DataSet file otherwise.

The LoadDataSetFile and LoadXMLDataSetFile commands are still valid although we recommend that you use the LoadDataSet command instead.

The columnTag parameter can be specified in a few different ways to allow different parsing of the XML document:

columnTags Effect
"" (empty) The text immediately after the start of each rowTag will be used for the only column in the DataSet, this column will be named after the rowTag name
"tag1, tag2, tag3,..". The DataSet will feature the specified columns, composed by the text immediately inside each of these tags, for each rowTag
"tag1#attr1, tag2#attr2"

Each tag marked with an hash will contribute with the text of the attr1 or attr2 attribute inside the respective tag, for example:
<tag1 attr1="some"/> <tag2 attr2="times"/>
would use the text "some" and "times" for successive columns inside the created DataSet. The created DataSet columns would be called "tag1#attr2" and "tag2#attr2"

"tag1#attr1=alias1, tag2#attr2=alias2" Just like the above, but the columns will be defined on the DataSet with the column name specified in alias1 and alias2. This is important for some commands that depend on column names like the AutoImage or AutoMovieClip

XML entity references like &amp; and &gt; will be accordingly expanded on the read values.

Equivalent MML

The MML equivalent to this command is <DataSet>

 

 

LoadVar Command

Description

Load Turbine variables from a local file or HTTP location.

Syntax

[C#]
bool LoadVar(String* location);

location is an absolute or relative filename or a URI pointing to the Variables file to load.

Return Values/Errors

Returns true if no errors occurred.
 
Could not access variables file
The location specified could not be found.
 
Variables file has bad format
The file was found but it could not be read. Check the syntax of your Variable file.

Remarks

The old command LoadVariableFile can still be used, but we recommend that you use the LoadVar instead.

Equivalent MML

The MML equivalent to this command is <Var>

 

 

MakeDataSet Command

Description

Initialize a DataSet with the supplied columns.

Syntax

[C#]
bool MakeDataSet(String* dataSetName, String* columns);

dataSet is the name of the DataSet to define.
columns is a coma separated list of column names the DataSet will have.

Return Values/Errors

Returns true if no errors occurred.
 
DataSetRow parameter must be comma-separated
The specified row must be a comma separated list of values.

Equivalent MML

The MML equivalent to this command is <DataSet>

 

 

PublishVar Command

Description

Publishes Turbine variables to Flash Action Script (AS).

Syntax

[C#]
bool PublishVar(String* varNames [, String* toFormat, String* arrayName] [, String* instanceName]);

varNames is a comma separated string with the names of the variables to publish into AS.
toFormat is the AS variable type where the variables are going to be published.
arrayName is the name given to the AS array.
instanceName
is the name of the instance created inside the media in where the AS variables will be defined. By default, Turbine assumes an unique name if no value is provided.

Return Values/Errors

Returns true if no errors occurred.
 
Out of memory publishing variables
Memory allocation error. Is your system running out of virtual memory?

varNames argument has bad format
Check the syntax of param varNames.

Remarks

The default behavior for this command (when only the first param is provided) is publishing to AS variables with the same name as the Turbine variables.

Variable names which contain the characters '.' or '$' will be translated to '_'.

The ToFormat param can have the following values:

toFormat Effect
"array" the variables are published to an AS array. The first variable will be placed in the first position of the array, the second in the second position and so on.
"namedArray" the variables are published to an AS named array, using the original variable names as String indexes
"" (empty)

empty string, means the variables are published individually and will use their original names as AS variables

This command is only useful for Flash output.

Equivalent MML

The MML equivalent to this command is <PublishVar>

 

 

PublishDataSet Command

Description

Publishes a Turbine DataSet to a Flash Action Script (AS) array or named array.

Syntax

[C#]
bool PublishDataSet(String* dataSetName [, String* toFormat, String* arrayName] [, String* instanceName]);

dataSetName is the Turbine DataSet to publish into AS.
toFormat is the AS type where the DataSet is going to be published.
arrayName is the name given to the AS array.
instanceName is the name of the instance created inside the media in where the AS variables will be defined. By default, Turbine assumes an unique name if no value is provided.

Return Values/Errors

Returns true if no errors occurred.
 
Out of memory publishing DataSet
Memory allocation error. Is your system running out of virtual memory?

DataSet not found
The DataSet provided wasn't found.

Error publishing DataSet
There was a generic error when trying to publish.

Remarks

The default behavior for this command (when only the first param is provided) is publishing to individual AS variables.

The ToFormat param can have the following values:

toFormat Effect
"array" the DataSet is published to an AS bi dimensional array, mapping each row and column of the DataSet to the same row and column of the array
"namedArray" identical to the previous format, except that the column names of the DataSet will be used as one index for the AS named array
"" (empty)

empty string, means the DataSet is published to individual AS variables using the syntax 'dataSetName_ColumnName_RowNumber'

This command is only useful for Flash output.

Equivalent MML

The MML equivalent to this command is <PublishDataSet>

 

 

Reset Command

Description

Clears the memory of Turbine which causes the associated media to also be cleared. Usually this command is used when generating several files to disk where you must clear the previous media before starting the new one.

Syntax

[C#]
bool Reset();

Return Values/Errors

No errors are raised by this command.

 

 

Script Command

Description

Compiles a Flash Action Script (ECMA-262 Script or JavaScript language) block.

Syntax

[C#]
bool Script(String* script);

script is the Flash AS to insert into Turbine.

Return Values/Errors

Returns true if no errors occurred.
 
Out of memory
Memory allocation error. Is your system running out of virtual memory?

Script compilation error
The script did not compile because it has syntactic errors.

Remarks

Accepts scripts compatible with Flash MX scripting.

Equivalent MML

The MML equivalent to this command is <Script>

 

 

ServeCached Command

Description

Serve media cached with the given reference.

Syntax

[C#]
bool ServeCached(String* reference [, String* mediaType]);

reference is the unique id for the cached movie. The movie must have been cached by the Turbine.CacheMovie command.
mediaType is the media format outputted by Turbine. Currently "flash" for Macromedia Flash and "pdf" for Adobe PDF are available. The default value is "flash" if not provided.

Return Values/Errors

Returns true if the media was served from the cache, false if no valid media was found on the cache or if an error occurred.
 
Error serving media
An error occurred when serving the media
.

 

 

ShowFrame Command

Description

Causes Turbine to display the current frame and start a new one.

Syntax

[C#]
bool ShowFrame([int numFrames]);

numFrames is the number of frames to show, by default 1.

Return Values/Errors

No errors are raised by this command.

Remarks

Frames are translated to PDF pages, so this command will add a new page when outputting to PDF format.

 

 


Properties

 

 

BaseDirectory Property

Description

Gets the BaseDirectory which is the location of the ASP.NET script, which serves as a base for any relative file locations.

Syntax

[C#]
String* BaseDirectory {get;}

Return Values/Errors

This property raises no trappable errors.

 

 

BinDirectory Property

Description

Gets the BinDirectory which is the directory where Turbine is installed and where the configuration files are located.

Syntax

[C#]
String* BinDirectory {get;}

Return Values/Errors

This property raises no trappable errors.

 

 

Color Property

Description

Sets/gets the current background color of the media.

Syntax

[C#]
String* Color {get; set;}

Color is a string representing the background color of the media with the format #RRGGBB.

Return Values/Errors

Could not set value
An error occurred when setting the value.

 

 

Compress Property

Description

Sets/gets the compression rate of the output media.

Syntax

[C#]
int Compress {get; set;}

Compress is the compress rate of the output media. A value of 0 means that compression is switched off and a value of 9 means that the media will be highly compressed.

Return Values/Errors

Could not set value
An error occurred when setting the value.

 

 

Debug Property

Description

Shows/hides the Turbine Window for debugging and logging.

Syntax

[C#]
bool Debug {get; set;}

Debug set to true means that the Turbine Window will be shown.

Return Values/Errors

Could not set value
An error occurred when setting the value.

 

 

FlashVersion Property

Description

Gets/sets the Flash version of the generated movie.

Syntax

[C#]
String* FlashVersion {get; set;}

Return Values/Errors

Could not set variable
An error occurred when setting the value.

Remarks

Useful when one wishes to generate Flash with a specific version. For instance, Turbine.FlashVersion = "6", makes Turbine output Flash MX.

 

 

Frame Property

Description

Gets or sets the current Flash movie frame or PDF page.

Syntax

[C#]
int Frame {get; set;}

Return Values/Errors

This property raises no trappable errors.

Remarks

Frames are translated to PDF pages on PDF output.

 

 

FrameRate Property

Description

Sets/gets the Flash movie framerate.

Syntax

[C#]
int FrameRate {get; set;}

Return Values/Errors

Could not set value
An error occurred when setting the value.

 

 

Height Property

Description

Sets/gets the native height of the media to be generated.

Syntax

[C#]
int Height {get; set;}

Height is the height of the media.

Return Values/Errors

Could not set value
An error occurred when setting the value.

 

 

Info Property

Description

Returns a string formatted in HTML with general and configuration information from Turbine.

Syntax

[C#]
String* Info {get;}

Return Values/Errors

No errors are raised by this command.

Remarks

This property is useful for debug purposes, to list the current Turbine environment.

 

 

Log Property

Description

Sets/gets the log level of Turbine.

Syntax

[C#]
String* Log {get; set;}

Log is a string that tells Turbine what to log:
"errors" - Turbine should only log errors
"warnings" - Turbine should only log warnings
"info" - Turbine should only log information
"all" - Turbine should log everything
"" - Turbine should log nothing
You could set a combination of any of the above separated by commas.

Return Values/Errors

Could not set value
An error occurred when setting the value.

 

 

LogTo Property

Description

Sets/gets to where should Turbine make its log entries: to file or to media or to both of them

Syntax

[C#]
String* LogTo {get; set;}

LogTo is a string that tells Turbine where to log:
"file" - Turbine should log to a file
"media" - Turbine should log to media. If media is Flash then the logs will be shown inside the Turbine Window
"" - Turbine should log to nowhere
You could set a combination of any of the above, separated by commas.

Return Values/Errors

Could not set value
An error occurred when setting the value.

 

 

NumFrames Property

Description

Gets the total number of existing frames of the current media.

Syntax

[C#]
int NumFrames {get;}

Return Values/Errors

This property raises no trappable errors.

Remarks

Frames are translated to PDF pages, so this property returns the total number of pages when generating PDF format.

 

 

PDFOwnerPassword Property

Description

Gets/sets the encryption password of a PDF document, causing it's contents to be encrypted.

Syntax

[C#]
String* PDFOwnerPassword {get;set;}

Errors

Could not set variable
An error occurred when setting the value.

 

 

PDFPermissions Property

Description

Gets/sets the permissions of a PDF document.

Syntax

[C#]
String* PDFPermissions {get; set;}

PDFPermissions is a string that tells Turbine what permissions to give to a PDF file:
"noPrinting" - the PDF user can't print the file
"noChanging" - the PDF user can't change the document
"noContentCopying" - the user can't copy the document contents
"noCommenting" - the user can't comment the document
You could set a combination of any of the above, separated by commas.

Errors

Could not set variable
An error occurred when setting the value.

Remarks

This property only has any effect if the PDF document is encrypted. To encrypt a PDF document set the PDFUserPassword or the PDFOwnerPassword.

 

 

PDFUserPassword Property

Description

Gets/sets the open password of a PDF document causing it's contents to be encrypted. The user must provide this password in order to open it.

Syntax

[C#]
String* PDFUserPassword
{get;set;}

Errors

Could not set variable
An error occurred when setting the value.

 

 

PDFVersion Property

Description

Gets/sets the PDF version of the generated document.

Syntax

[C#]
String*
PDFVersion {get;set;}

Errors

Could not set variable
An error occurred when setting the value.

Remarks

Useful when one wishes to generate a PDF document with a specific version. For Acrobat PDF viewer 6, use 5, for Acrobat PDF viewer 5 use 4 and so on. Default is version 2, requiring Acrobat PDF viewer 3.

 

 

Protect Property

Description

Sets/gets the flag that tells if the media is protected from editing or importing.

Syntax

[C#]
bool Protect {get; set;}

Protect is true if the current media should be protected from editing and importing.

Return Values/Errors

Could not set value
An error occurred when setting the value.

Remarks

Applicable to Flash output only. To give permissions or to encrypt a PDF document see PDFUserPassword, PDFOwnerPassword and PDFPermissions Properties.

 

 

Variable/Var Property

Description

Sets/gets a Turbine variable.

Syntax

[C#]
String* Variable[String* name] {get;}
String* Var[String* name] {get;}

String* Variable[String* name] {set;}
String* Var[String* name] {set;}
int Variable[String* name] {set;}
int Var[String* name] {set;}
double Variable[String* name] {set;}
double Var[String* name] {set;}
bool Variable[String* name] {set;}
bool Var[String* name] {set;}

name is the name of the Turbine variable to set/get.
value is the value to set.

Return Values/Errors

Variable name is too big
The variable name is too long. Use a shorter name.
 
Could not set value

An error occurred when setting the value.

 

 

Version Property

Description

Returns Turbine version information and other related information.

Syntax

[C#]
String* Version {get;}
String* Version.Assembly {get;}
String* Version.BaseCore {get;}
String* Version.TurbineCore {get;}
String* Version.Product {get;}
String* Version.State {get;}
String* Version.CompanyName {get;}
String* Version.CopyRight {get;}
String* Version.URL {get;}

Assembly is the assembly version.
BaseCore and TurbineCore are the core versions of Turbine.
Product is the Turbine version.
State tells if the version of Turbine is registered or not.
CompanyName is Turbine maker's name.
CopyRight is the copyright information.
URL is the support URL for Turbine.

Return Values/Errors

This property raises no trappable errors.

Remarks

This property is useful for debug purposes, to know if your configurations match the expectations.

 

 

Width Property

Description

Sets/gets the native width of the media to be generated.

Syntax

[C#]
int Width {get; set;}

Width is the width of the media.

Return Values/Errors

Could not set variable
An error occurred when setting the variable.

 

 

Table of Contents

 
Flash and Macromedia Flash are trademarks of Macromedia, Inc.