Flash.CallFunction

string Flash.CallFunction ( 

string ObjectName,

string XMLRequest )

Example 1

-- Call the actionscript function named "myFlashFunctionName".
strXMLResult = Flash.CallFunction("Flash1", "<invoke name=\"myFlashFunctionName\" returntype=\"xml\"><arguments><string>Some text to submit</string></arguments></invoke>");

-- Parse the string result.
XML.SetXML(strXMLResult);
strTextResult = XML.GetValue("string");

Dialog.Message("Function Result", strTextResult);

Calls a Flash file's actionscript function named "myFlashFunctionName" passing it the string 'Some text to submit' and shows the result in a dialog message.

Note: This example assumes you have a Flash file containing an exposed function named "myFlashFunctionName."

Example 2

strXMLResult = Flash.CallFunction("Flash1", "<invoke name=\"loadPlayVideo\" returntype=\"xml\"><arguments><string>C:\\Temp\\my_video.flv</string></arguments></invoke>");

Calls a Flash file's actionscript function named "loadPlayVideo" that loads and plays the Flash video file named 'my_video.flv'.

Note: This example assumes you have a Flash file containing an exposed function named "loadPlayVideo."

See also:  Related Actions