Table of contents
31 January 2011
Knowledge of ActionScript 3 and Flex is required to make the most of this article.
Additional required product:
This article describes a custom survey application that extends the functionality of Adobe Connect 8 for end users by providing a way to prepare and conduct surveys in meetings. The application, Survey.swf, was built using the Adobe Connect Collaboration Builder SDK, which includes SyncConnector.swc, an Adobe Flex component that enables synchronization of SWF files in Adobe Connect. After Survey.swf is loaded into an Adobe Connect Share pod, the host can initiate a multiple-question poll of all attendees.
Unlike a Poll pod, which can only pose one question at a time, Survey.swf can be configured, via XML, to pose multiple questions, including true/false, multiple-choice, and Likert scale style questions. This application can be used before the start of a seminar to get a better understanding of the participants' expectations or at the end of it to gather feedback.
The Survey application provides several features to support the creation, import, export, and execution of survey questionnaires:
- Create survey: Once the application is loaded into a Share pod, the host has the option to create a new survey from scratch by composing a series of true/false, multiple-choice, and Likert scale questions (see Figure 1).
- Import survey as XML: Instead of composing the survey questions during the meeting, the host can prepare a survey in XML format before the meeting starts and simply import the XML file during the meeting (see Figure 2).
- Export Survey as XML: Once a survey has been created, the host can export it in XML and use it in future meetings and seminars. The export feature requires the Adobe Connect 8 Meeting Add-in, which enables the XML data to be saved locally as a file on the host's computer.
After the survey is initiated, or opened, all meeting participants have the opportunity to answer the questions and submit their responses. After completing the survey, the participants are presented with the survey results, which update automatically as each participant finishes until the survey is closed (see Figure 3).
Survey.swf was created using Adobe ActionScript 3 and the Adobe Flex framework. It uses XML objects not only to save questions but also to store and communicate the results of the survey.
When a user submits his or her survey, the Survey.swf application must synchronize with the other instances of itself in the Adobe Connect meeting. Synchronization support is provided by the SyncConnector.swc library, part of the Adobe Connect Collaboration Builder SDK. This library must be included with the project files when the project is compiled for Adobe Flash Player.
To use the synchronization APIs, you create an instance of the SyncConnect object—for example:
On the application's
creationComplete event, add event listeners for the SyncConnector object's
CAUGHT_UP event handler, perform any tasks that are required immediately after the SWF loads. In the Survey application, for example, this handler ensures that any new participant entering the room is shown the questionnaire if a survey is already open.
SYNC_MSG_RCVD event handler is invoked when new synchronization events are received. For example, in the Survey application, this event handler is triggered when a new survey is opened and sent to the attendees.
You can use
syncConnector.dispatchSyncMessage to send an XML object or any string to other instances of the application loaded in the Share pod. For example, Survey.swf uses the following code to send the survey to all participants in the meeting:
syncConnector.dispatchSyncMessage "SendQuestions",SurveyQuestionsXML,false ;
The same mechanism is used to send the survey responses back to the host, so they can be parsed and added to the results in the survey's final report.
The Survey application is a small example of what can be done using the Adobe Connect Collaboration Builder SDK. You can begin using the application as is to conduct surveys in your own meetings, or use it as inspiration for your own custom Adobe Connect application.
For more information, including details on how to test an application in Flash Builder without Adobe Connect, see Using the Adobe Connect Collaboration Builder SDK 2.0 (PDF, 204 KB).
Read other tutorials on the also Adobe Connect Developer Center.