Adobe Dreamweaver API Reference CS5 Uživatelský manuál Strana 50

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 533
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 49
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.
<invoke name="flashCallback" returntype="xml">
<arguments>
<string>Hello</string>
</arguments>
</invoke>
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 = '<invoke name="flashCallback" returntype="xml">
<arguments>
<string>Hello</string>
</arguments>
</invoke>';
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.
Zobrazit stránku 49
1 2 ... 45 46 47 48 49 50 51 52 53 54 55 ... 532 533

Komentáře k této Příručce

Žádné komentáře