Using The Csxs Api; Delivering A Plug-In With A Flash Ui; Build And Install The C++ Plug-In - Adobe 65061456 Programmer's Manual

Programming guide
Table of Contents

Advertisement

C
3: Creating a Flash UI for Plug-ins
HAPTER
To dispatch events from your C++ plug-in to the Flash extension, use
SDKPlugPlug::DispatchEvent()
XML format. For example:
std::string xmlString = "<payload>...</payload>";
csxs::event::Event event = {
"com.adobe.csxs.events.UpdateDashPanel",
csxs::event::kEventScope_Application,
"test", NULL, xmlString.c_str()} ;
csxs::event::EventErrorCode testResult = DispatchEvent(&event);

Using the CSXS API

The CSXS ActionScript library provides an API that your Flash extension uses to interact with C++ plug-ins.
For complete reference details, see the documentation provided with the Adobe Creative Suite SDK.
To receive CSXS Events of a certain type in ActionScript, register a callback function for that event type
using
public function updatePanel (event : CSXSEvent) : void {...}
CSXSInterface.getInstance().addEventListener("com.adobe.csxs.events.updatePanel",
To dispatch events from your extension to your C++ plug-in, use
related data as a string. To encapsulate complex values in data, you can use XML format. For example:
var okClickEvent : CSXSEvent = new CSXSEvent("com.adobe.csxs.events.OkClicked",
var xml : XML = new XML("<payload>...</payload>");
okClickEvent.data = xml;
var result : Boolean = CSXSInterface.getInstance().dispatchEvent(okClickEvent);

Delivering a plug-in with a Flash UI

This section uses the FreeGrid sample plug-in and the FreeGridUI sample extension as examples to
describe how to build, install, and debug a plug-in with Flash UI.

Build and install the C++ plug-in

To build your C++ plug-in in Windows, use Visual Studio 2008. In Mac OS, use XCode.
1. Open the project file:
In Windows:
In Mac OS:
2. Build the project. The build result is placed in a subfolder of the
which target you build:
In Windows:
In Mac OS:
. For example:
addEventListener()
\samplecode\FreeGrid\FreeGrid.vcproj
/samplecode/FreeGrid/FreeGrid.xcodeproj
output\win\debug
output/mac/debug
. You can encapsulate complex values in the associated data using
CSXSEventScope.APPLICATION);
or
output\win\release
or
output/mac/release
Delivering a plug-in with a Flash UI 33
updatePanel);
dispatchEvent()
folder, depending on
samplecode
. You can pass

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs5

Table of Contents