This is the documentation for the Articulate Presenter Player SDK. Click here to download the SDK package.
Introduction to the Player SDK
The Articulate Presenter Player SDK gives Flash developers the ability to create custom Flash movies that extend and interact with the Articulate Presenter Player. With the SDK, developers are able to:
- Add functionality by developing custom player tabs.
- Add player features by creating custom player toolbar items.
- Customize certain player assets.
- Communicate with the player via runtime API methods.
This documentation, along with the included sample files, will provide you with tools to get you started.
Creating Custom Tabs
Articulate Presenter ships with four tabs - Outline, Thumbnails, Notes and Search. In addition, you can create your own custom tabs to provide additional features and functionality for the Player. You create custom tabs by modifying the supplied .FLA file in Flash MX and also editing an XML file.
Locate the sample tab in the folder named "Test_Tab." This folder contains the source FLA file TestTab.fla, the compiled SWF file TestTab.swf, and the art_plugins.xml file that references the TestTab.swf file. To add this test tab to any presentation simply copy the SWF and XML file to the "player" folder of any published presentation.
Create your own custom tab by first modifying the FLA file in Flash MX. Publish your SWF for Flash Player 6. Tabs are then added to the Player by modifying the file art_plugins.xml. Within the "modules" section, define an item for each custom tab in your presentation. A typical item will look the following:
Below is a quick description of the tags:
enabled -- Determines whether or not to display the item.
id -- An internally used ID. It must be a number and unique among all item IDs.
type -- Determines whether the custom item is a toolbar or a tab item. Use "navmod" for tab items; use "toolmod" for toolbar items.
file -- Defines the SWF the Player will display when the item is activated.
labeltext -- The text that is displayed on the tab or toolbar button.
scrollenabled -- If the item is a tab, this value enables or disables the scrollbar.
All tags are required except for scrollenabled. You may add more tags to provide the item with more information. Once built, your custom tabs and toolbar items can be added to any presentation by simply copying your SWF and XML files to the published output's "player" folder. You can also automatically include your custom tabs and toolbar items in every publish by copying them to the "player" folder within the program. This way, they will be included in the published output with each future publish. Assuming you installed Presenter to the default location, the folder will live here:
Creating Custom Toolbar Items
Articulate Presenter Player includes several toolbar items accessed from the upper-right of the Player. The standard toolbar items include Attachments, Bookmark, Send Link, and Exit. Like tabs, you can create your own custom toolbar items to provide additional features and functionality to the Player.
Adding a custom toolbar item is similar to adding a custom tab. Locate the sample toolbar item in the folder named "Test_Tool." This folder contains the source FLA file TestTool.fla, the compiled SWF file TestTool.swf, and the art_plugins.xml file that references the TestTool.swf file. To add this toolbar item to any presentation simply copy the SWF and XML file to the "player" folder of any published presentation.
Create your own custom toolbar item by first modifying the FLA file in Flash MX. When creating your Custom toolbar item, you must implement a function named artModuleAPI. This function is a command handler that should handle events from the Player. It should handle the following commands:
A typical implementation of this command handler follows:
function artModuleAPI( command )
Additionally, it is the responsibility of the toolbar item to define a Boolean variable named "artModuleIsActive" at the item's base level and set the value of this variable based on whether or not the toolbar item is active or not. When finished authoring your custom toolbar item, publish your SWF for Flash Player 6.
As with tabs, create a new item tag within art_plugins.xml for each custom toolbar item you wish to add to your presentation. A typical toolbar item will look similar to the following:
An asset is a Player component that resides outside of the core player files. Assets are usually required for the Player to function normally. Asset file names contain the prefix "ast_." Not all assets can be modified; you will find all modifiable assets in the included "Assets" folder. Below is a list of the supplied FLA files followed by a brief description.
You will find an example of ast_remote.fla in use in the included sample presentation; toggle to the "slide-only" display mode to view it. Contained within each FLA file on the layer named "Implementation Notes," you will find any special instructions needed to modify or create your own asset.
The Articulate API Object
The Articulate API object is a global variable and is accessible to a Flash movie loaded within the playershell.swf simply by referencing ArtAPI. However, if the loaded SWF was published for a different version of Flash then version 6, the global object may not be accessible. For this reason we strongly encourage you to reference the ArtAPI as at _level0.ArtAPI. This way you will always have access to the API object and you will not have to be as concerned about the published Flash version.
You can find a sample movie that implements the API in the folder "Flash_Object." This folder contains the source FLA and the generated SWF.
Below is a list of the methods exposed by the API:
Causes the player to continue playing. If the player is already playing then it does nothing.
Pauses the player if it is currently playing. If the player is already paused then it has no effect.
Locks the play /pause button so that the user can't start or stop the presentation until it is unlocked.
Plays the next slide.
Plays the previous slide.
Plays the slide specified by nSlideNum. nSlideNum must be an integer greater than 0 and less than or equal to the number of slides in the presentation.
Goes to the frame specified by nFrameNum in the current slide.
Changes the display mode to the mode specified by strDisplayMode. strDisplayMode can have the following values:
1 -- The standard view
2 -- The no sidebar view
3 -- The slide only view
'next' -- toggles the display mode to the next enabled view
Returns a number representing the current display mode. For more details see Set- DisplayMode.
Returns the index of the currently displayed slide
Returns true if the slide is playing and false if it has been paused.
Returns the current position in seconds within the slide.
Returns the current position in seconds within the presentation.
Returns the number of slide contained within the presentation.
Returns the Volume setting.
Sets the volume to the value specified by nVolume. nVolume should be a number between 0 and 100.
Returns a slide info object. Supported properties:
oSlideInfo.strFileName -- The slide file SWF name
oSlideInfo.strBgSwf -- The slide background SWF name
oSlideInfo.nPlayListId -- The slide's playlist id
oSlideInfo.strTitle -- The slide title
oSlideInfo.strSlideText -- The slide text
oSlideInfo.strNotes -- The slide notes
oSlideInfo.nSlideTime -- The slide duration
oSlideInfo.bWaitForUser -- Determines if the slide waits when it reaches the end or plays the next slide
oSlideInfo.nFrameRate -- The slide framerate
oSlideInfo.nLevel -- The nesting level of the slide
Returns a reference to the array representation of the xml for the specified module ID. The structure of this array may vary depending on the data included in the modules xml.
Returns a reference to the array representation of the xml data contained within playerproperties.xml.
Returns a reference to an array representation of the xml data contained within presentation.xml.
Enables or disables keyboard shortcuts based on the value of bEnable.
Returns true if a color scheme has been enabled for the player.
Returns a color info object. Properties supported:
Adding Your Custom API SWF to Your Presentation
When inserting a Flash movie that contains the API into a slide, follow the steps:
- In PowerPoint menubar, select Articulate --> Flash Movie.
- Browse to and select the Flash movie that contains the API.
- Select "Display in slide."
- Select from the Synchronization drop-down menu the "Movie plays independently of slide" option.
- Set other options to your liking.
- Click OK.