Dreamweaver.flash.controlevent() – Adobe Dreamweaver API Reference CS5 User Manual
Page 50

45
DREAMWEAVER API REFERENCE
Flash integration
Last updated 8/27/2013
Example
controlData = {};
controlData.defaultGeometry = {topleftx : 100, toplefty : 100, width : 200, height : 200 };
controlData.minSize = {width : 100; height : 100 };
controlData.maxSize = {width : 300; height : 300 };
var swfPath = dw.getConfigurationPath();
swfPath += '/flash/PhotoAlbum.swf';
controlData.swfUTF8Path = swfPath;
// open the window
flash.requestStateChange("com.adobe.extension.foo","Open",controlData.defaultGeometry);
dreamweaver.flash.controlEvent()
Availability
Dreamweaver CS4.
Description
This function is used to pass events to a flash control. Event calls are passed as an XML string that captures the function
and the relevant parameters. The XML string captures the function in the SWF files that must be started.
Arguments
inControlID
,
inXMLString
•
The
inControlID
argument is a string.
•
The
inXMLString
argument is a string. Pass the following
inXMLString
to call the function in the flashCallback
flash file and pass a single string, 'Hello' as an argument.
Returns
Returns an XML string.
Example
The following example calls the
flashCallback
function from JavaScript. In this example, you pass the callback
function name and its arguments as an XML string.
var xmlString = '
In this example, you use
dw.flash.controlEvent
to call back into the flash file (.swf):
dw.flash.controlEvent('Flickr', xmlString);
The following arguments are used in this function:
•
Flickr
, which is the ID of the extension that is passed in when the .swf control was created with
dw.flash.newControl
.