ActionScript 3 Skin Development Reference

iSpring Platform provides Flash developers with custom player skin development facilities. The creation of a custom skin requires basic knowledge of ActionScript 3 and Object-oriented programming (OOP) background in Flash.

A skin is defined by a set of files:

Skin module

A skin module is an SWC class library containing ActionScript 3 code of the skin. iSpring requires the skin class library to contain a class definition implementing the ispring.presenter.player.skin.ISkinFactory interface. During the Flash presentation startup the player core creates the instance of the skin factory class and uses it to create a skin instance. Then, the created skin instance is added to stage.

The skin module uses the presentation view provided during its creation to show the presentation content to the user. The skin can also add the video narration player provided by the presentation view to show video narration to the user.

A skin can have several skin modules with different functions. The publish settings XML file defines the skin module which will be linked to the presentation.

Skin definition file (player.xml)

Here is an example of the player.xml file of the "None (AS3)" skin:

<?xml version="1.0" encoding="UTF-8"?>
<!-- id: player id
     descriptionPath: a relative path to the player description file
     version: skin version, used by iSpring Pro to determine whether the stored skin
              settings are up to date
     priority: defines an order of appearance in the player templates list -->
<player id="nullAs3" 
        descriptionPath="description.xml"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        version="11"
        priority="70">
  <defaultSettings>
    <!-- A relative path to the presentation publishing settings file -->
    <publishSettings src="publish_settings.xml"/>
    <!-- A relative path to the skin settings file -->
    <skinSettings src="skin_settings.xml"/>
  </defaultSettings>
  <!-- A list of available skin modules -->
  <skinModules>
    <module id="FullFeatured" 
            requiredFlashVersion="101"
            src="null_skin.swc"
            skinFactoryClass="ispring.presenter.player.skin.nullskin.NullPlaybackSkinFactory" />
  </skinModules>
</player>

Publish settings XML file

Here is an example of the publish_settings.xml file of the "None (AS3)" skin:

<?xml version="1.0" encoding="UTF-8"?>
<publishSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- An ID of the skin module linked to the presentation -->
  <skinModule id="FullFeatured"/>
  <presentationContent>
    <resources>
      <!-- A list of embedded fonts required by the skin -->
      <fonts>
        <!-- family: A family name of the font
             embedName: The embed name of the font to use in the skin 
             bold: Indicates whether bold character set is to be embedded (false by default
             italic: Indicates whether italic character set is to be embedded (false by default) -->
        <font family="Arial" embedName="ispringSkinFont">
          <!-- A list of embedded character sets -->
          <charsets>
            <!-- Embeds characters used by hyperlink tooltips -->
            <dynamicPlain type="DCT_HYPERLINK_TOOLTIP"/>
            <!-- Embeds the specified static character sets -->
            <static>Ok</static>
            <static>Yes</static>
            <static>No</static>
            <static>Resume Presentation</static>
            <static>Would you like to resume the presentation from the last slide viewed?</static>
            <static>Warning</static>
            <static>You must complete the quiz before leaving this slide.</static>
          </charsets>
        </font>
      </fonts>
    </resources>
  </presentationContent>
</publishSettings>

Skin settings XML file

Here is an example of the skin_settings.xml file of the "None (AS3)" skin. The skin uses the data from this file to set up its behavior. Its structure completely depends on the skin. The name of the root element of the XML file must be equal to "skin".

<?xml version="1.0"?>
<skin>
  <texts>
    <text id="mbOk">Ok</text>
    <text id="mbYes">Yes</text>
    <text id="mbNo">No</text>
    <text id="resumeWindowTitle">Resume Presentation</text>
    <text id="resumeWindowText">Would you like to resume the presentation from the last slide viewed?</text>
    <text id="quizSlideWindowTitle">Warning</text>
    <text id="quizSlideWindowText">You must complete the quiz before leaving this slide.</text>
  </texts>
</skin>

Skin description XML file

Here is an example of the description.xml file of the "None (AS3)" skin:

<?xml version="1.0" encoding="UTF-8"?>
<!-- playerId: The ID of the player (must be equal to the corresponding ID attribute
               of the player.xml file
     name: User-friendly name of the skin
    -->
<description
    playerId="nullAs3"
    name="None (AS3)"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</description>