fsplayer.ui.skins.ISkin Interface

The ISkin interface is provided by all iSpring-compatible skin modules and used to connect the player core with the User Interface. The ISkin interface exposes the following methods called by the player core.

Table 1. Methods
Method Description
initialize(player:IPlayer):Void This method is invoked by the player core to initialize the skin. The information provided by the passed player parameter can be used by the skin to initialize its visual components. Note: playback control methods of the IPresentationPlaybackController interface are inaccessible until the skin gets initialized. Skins use ISkinListener interface to notify the core at the end of the skin initialization process. See Remarks section for more details.
getSlideShowWindow():ISlideShowWindow Returns the ISlideShowWindow interface providing the player core with the target MovieClip for presentation slides loading.
setListener(listener:ISkinListener):Void The player core passes ISkinListener interface that allows core to receive notifications about skin initializaiton process.


Skin initialization can take some time, especially when the skin loads some extra data from the Internet. In order to get the initialization notification the player core implements the ISkinListener Interface and passes it to the skin via the setListener() method.


The following example illustrates the minimal implementation of the ISkin, ISlideShowWindow, an IPlaybackListener interfaces.

import fsplayer.ui.skins.*;
import fsplayer.api.*;

class CSkinImpl implements IPlaybackListener, ISkin, ISlideShowWindow
private var m_skinTarget:MovieClip;

private var m_slideAssetsTargetMovieClip:MovieClip;

private var m_listener:ISkinListener;
private var m_player:IPlayer;
private var m_skinSettings:Object;
private var m_presentation:IPresentationInfo;
private var m_playbackController:IPresentationPlaybackController;
private var m_skinInitialized:Boolean;

public function CSkinImpl(target:MovieClip)
    m_skinTarget = target;

// This method is called to initialize the skin
function initialize(playerAPI:IPlayer):Void
    m_player = playerAPI;
    m_skinSettings = m_player.getSettings();
    m_playbackController = m_player.getPlaybackController();
    m_presentation = m_player.getPresentationInfo();


// returns slide show window
function getSlideShowWindow():ISlideShowWindow
    return this;

// ISlideShowWindow.getTarget() returns the target MovieClip where slides will be loaded and displayed by player core
function getTarget():MovieClip
    if (!m_slideAssetsTargetMovieClip)
        m_slideAssetsTargetMovieClip = createSlideAssetsTarget();

    return m_slideAssetsTargetMovieClip;

// this method is called by playback core to get notified when the skin is loaded
function setListener(listener:ISkinListener):Void
    m_listener = listener;
    if (!m_skinInitialized)
        m_skinInitialized = true;

// empty implementation of IPlaybackListener interface methods. They can be overriden by inherited classes
function onPausePlayback():Void{}
function onStartPlayback():Void{}
function onCurrentSlideIndexChanged(slideIndex:Number):Void{}
function onSlideLoadingComplete(slideIndex:Number):Void{}
function onSlidePositionChanged(position:Number):Void{}
function onAnimationStepChanged(stepIndex:Number):Void{}
function onPresentationPlaybackComplete():Void{}

// This method can be used in the inherited classes to get the skin settings
private function getSkinSettings():Object
    return m_skinSettings;

// returns the target MovieClip where the skin resides. This method can be overriden in inherited classes.
private function getSkinTarget():MovieClip
    return m_skinTarget;

// This method creates the MovieClip slides will be loaded into
// This method can be overriden in the inherited classes
private function createSlideAssetsTarget():MovieClip
    return getSkinTarget().createEmptyMovieClip("assets", getSkinTarget().getNextHighestDepth());