Using Communication Components > PresentationSWF component > Using the PresentationSWF component |
![]() ![]() ![]() |
Using the PresentationSWF component
The following list describes two ways to use this component:
![]() |
Sales presentation: Display charts and other information while you deliver an online presentation. |
![]() |
Meeting agenda: Direct users' attention to different agenda items during a meeting. |
In the following example, you create two client files: presentSWF_test_speaker is for the presenter who has control of the slides, and presentSWF_test is for a viewing participant who does not have speaker capabilities. Although both of these clients point to the same application, presentSWF_test, only clients that are in speaker mode have the added speaker capabilities.
To use the component in your speaker application:
1 |
Make sure Flash Communication Server is running. |
2 |
Create a directory in the Flash Communication Server MX applications directory, and name it presentSWF_test. |
3 |
In the presentSWF_test directory, create a file named main.asc with the following code: |
load("components.asc"); |
|
Note: You can also copy the main.asc file from another application directory to this application's directory. |
|
4 |
In Flash MX, drag the PresentationSWF component onto the Stage and, in the Property inspector, give it an instance name, such as |
5 |
In the Property inspector, don't change the name of the default presentation SWF file, simple_preso.swf. To set additional parameters, see PresentationSWF component Property inspector. |
6 |
Drag the SimpleConnect component onto the Stage. |
7 |
In the Property inspector for the SimpleConnect component, provide the following two parameters: |
![]() |
In the Application Directory text box, type the URI of the application that you created in Step 2: |
![]() |
Double-click the Communication Components text box. In the Values dialog box that appears, click the plus sign (+) and type the instance name of the PresentationSWF component: |
By providing this value, you are using the SimpleConnect component to handle the connection for the PresentationSWF component. When the SimpleConnect component successfully connects to the server, the PresentationSWF component automatically connects to the server. |
|
8 |
In the first keyframe's Actions panel, add the following code to stop the progression of the movie and to set the mode to speaker mode: |
stop(); _global.speakerMode=true; |
|
9 |
Save and publish this file as presentSWF_test_speaker.swf. |
To use the PresentationSWF component in your viewer application:
1 |
Make a copy of the presentSWF_test_speaker.fla file and name it presentSWF_test.fla. |
2 |
In presentSWF_test.fla, change the following code after the |
_global.speakerMode=false; |
|
3 |
Save the presentSWF_test.fla file. |
To test the PresentationSWF component in both modes:
1 |
Open the presentSWF_test_speaker.swf file or, in the Flash MX authoring environment, choose Control > Test Movie, and log in. |
2 |
Open the presentSWF_test.swf file or, in the Flash MX authoring environment, choose Control > Test Movie, and log in as a different user. |
In presentSWF_test_speaker.swf, you are a presenter: you can create new slides and click back and forth through the presentation. You also have an outline of the presentation. |
|
In presentSWF_test.swf, you are a viewer: you can view the slides, but only as far as the presenter has progressed in the presentation. |
The following figure shows the speaker client application in the background and the viewer presentation in the foreground.
Name Variable Description Presentation SWF String; the default value is Viewer Buttons Enabled A Boolean value; the default value is
PresentationSWF component Property inspector
swfFile
simple_preso.swf
. Specifies the file to load for the presentation. You can change this file at runtime by calling the loadSWF
method.
viewerButtons
true
. If true
, users who are not in speaker mode can navigate the presentation file independently.
![]() ![]() ![]() |