Web Services and Flash APIs

WEB Services

get_ip.asp
getcookie.asp?
getid.asp
getnthfromlist.asp?
loginfo.asp
randomlist.asp?
setcookie.asp?
setcookies.asp?
textmatch.asp?

FLASH APIs

registerEventCallback(EVENT_FUNCTION)
registerMetricCallback(METRIC_FUNCTION)
resume()
start(XML_TO_EXECUTE)

WEB SERVICES

get_ip.asp

Location: http://www.statemachine.info/webservices/get_ip.asp

Returns the user's IP address.

getcookie.asp?

Location: http://frixxer.com/webservices/getcookie.asp?

Retrieves the user's HTML cookie specified in the parameter cookiename.

Example:

http://frixxer.com/webservices/getcookie.asp?cookiename=a_cookie

getid.asp

Location: http://www.frixxer.com/admin/getid.asp

When used within the <get_id> tag, creates a unique user ID and writes it into the variable ID.

getnthfromlist.asp?

Location: http://www.statemachine.info/matthew/apps/functions/getnthfromlist.asp?

Takes a string of numbers, each separated by a space, and returns a string containing the Nth number, where the parameter list is the string of numbers and the parameter nth is the N value.

For example:

http://www.statemachine.info/matthew/apps/functions/getnthfromlist.asp?list=%question_list%&amp;nth=%question_number%

If question_list = "2 7 4 12 8" and question_number = "4":

web_service_value = "12"

This can be used in conjunction with randomlist.asp to generate a random sequence.

loginfo.asp

Location: http://www.statemachine.info/webservices/loginfo.asp

Logs user data. This is the URL to specify within the <log_url> tag.

randomlist.asp?

Location: http://www.statemachine.info/matthew/apps/functions/randomlist.asp?

Generates a string of unique, random numbers, each separated by a space, based on the parameters max (maximum number) and number (desired number of random numbers).

For example:

http://www.statemachine.info/matthew/apps/functions/randomlist.asp?
max=20&amp;number=5

This will return a string of five random numbers from 1 to 20, for example:

5 3 13 10 6

This can be used in conjunction with getnthfromlist.asp to generate a random sequence.

setcookie.asp?

Location: http://frixxer.com/webservices/setcookie.asp?

Sets the user's HTML cookie specified in the parameter cookiename to the value specified in the parameter cookievalue.

Example:

http://frixxer.com/webservices/getcookie.asp?cookiename=a_cookie&amp;cookievalue=x

setcookies.asp?

Location: http://frixxer.com/webservices/setcookies.asp?

Sets multiple user HTML cookies specified in the parameter names to the values specified by the parameter values.

Accepts three parameters:

delimiter – the delimiter used for the lists of names and values
names – a delimited list of cookie names
values – a delimited list of values

Example:

http://frixxer.com/webservices/getcookie.asp?delimiter=,&amp;names=cookie_1,cookie_2&amp;values=%value_a%,%value_b%

textmatch.asp?

Location: http://www.statemachine.info/matthew/apps/functions/textmatch.asp?

Tests whether a string passed in the parameter test matches a specified set of acceptable matching strings, separated by pipes, passed in the parameter acceptable.

Returns one of five possible values: MATCH if the string matched, NOMATCH if it did not match, ERROR if there was an error in the web service, BLANK if an empty string was passed as test, or SN if a profanity was passed as test.

For example:

http://www.statemachine.info/matthew/apps/functions/textmatch.asp?test=%input%&amp;acceptable=%acceptable_text%

If input = "hello" and acceptable_text = "hello|hi|hey"

web_service_value = "MATCH"

FLASH APIs

See Embedding Your Application for an overview of these APIs and their purpose.

registerEventCallback(EVENT_FUNCTION)

Takes the function defined in the tag as a parameter and calls the function when an tag is encountered in the .xml file. The function passed as EVENT_FUNCTION must take a single string parameter.

registerMetricCallback(METRIC_FUNCTION)

Takes the function defined in the tag as a parameter and calls the function when an tag is encountered in the .xml file. The function passed as METRIC_FUNCTION must take a single string parameter.

resume()

Takes no parameters. Continues the execution from the defined within the tag that caused the break in execution.

start(XML_TO_EXECUTE)

Takes the name and location of the .xml file as a string. Use this when ContentFile is set to "NOLOAD" (alternatively, ContentFile can be set to the name and location of the .xml file).