Flash Slide ActionScript 3 API Reference

Standalone Flash slides generated with iSpring expose an ActionScript 3 API, a set of ActionScript 3 classes and interfaces allowing programmatic access to the Flash slide:

A Flash application can load an iSpring generated slide using the flash.display.Loader class. In order to access the slide API, the SWF file must be loaded in the new Application Domain derived from the current application domain. Though it is also possible to load a slide in the current application domain, it is not recommended since it may cause class and interface definition collisions when loading multiple slides created with different versions of iSpring.

The loaded SWF file properties and methods become ready to use as soon as the init event is dispatched by the contentLoaderInfo property of the Loader object. To determine whether the loaded SWF file is an iSpring generated slide, it is necessary to check whether the content property of the LoaderInfo object implements the ispring.presenter.ISlidePlayerContainer interface.

iSpring generated Flash slides support progressive downloading which means that API becomes accessible playing as soon as the minimum required amount of data has been downloaded. To determine whether the slide player is loaded and accessible via the player property, use the playerIsAvailable property on the ISlidePlayerContainer interface. The presentation container dispatches the ispring.presenter.PlayerContainerEvent.PLAYER_IS_AVAILABLE event to notify its listeners that the player is accessible.

The following example illustrates how to load an iSpring generated standalone slide and access its ISlidePlayer interface.

import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.events.Event;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;
import flash.system.LoaderContext;
import ispring.presenter.ISlidePlayer;
import ispring.presenter.ISlidePlayerContainer;
import ispring.presenter.PlayerContainerEvent;

// It is necessary to load the slide in the derived application domain
// in order to access the slide API
var slideDomain:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
var loader:Loader = new Loader();
var info:LoaderInfo = loader.contentLoaderInfo;
// The Slide API is accessible only after the Event.INIT event is dispatched
info.addEventListener(Event.INIT, onInit);
// Load the slide
loader.load(new URLRequest("slide.swf"), new LoaderContext(false, slideDomain));

function onInit(evt:Event):void
    // Check whether the loaded SWF file is an iSpring generated slide
    var pc:ISlidePlayerContainer = info.content as ISlidePlayerContainer;
    if (pc != null)
        if (pc.playerIsAvailable)
            // The player has not been loaded yet, so we need to wait
            // for the PlayerContainerEvent.PLAYER_IS_AVAILABLE event
            pc.addEventListener(PlayerContainerEvent.PLAYER_IS_AVAILABLE, onPlayerAvailable);

            function onPlayerAvailable(evt:PlayerContainerEvent):void
    else // The SWF file is not an iSpring generated standalone slide

function doSomethingWithThePlayer(player:ISlidePlayer):void
    // Now we can access the slide player methods and properties
    trace("Slide title is:", player.slide.title);

The following table lists all interfaces and classes of the Flash Slide ActionScript 3 API.

Class/Interface Package
AssetEvent ispring.utils.assets
AssetState ispring.utils.assets
IAnimationStep ispring.presenter.presentation.slides
IAnimationSteps ispring.presenter.presentation.slides
IAsset ispring.utils.assets
IAudioPlaybackControllerFactory ispring.presenter.player.audio
ICompany ispring.presenter.presentation
IGraphicAsset ispring.utils.assets
IHyperlinkManager ispring.presenter.player.core
IMediaPlaybackController ispring.presenter.player.media
IMetaCommand ispring.presenter.presentation.meta
IMetaCommands ispring.presenter.presentation.meta
IPresentationClock ispring.presenter.player.clock
IPresentationClock2 ispring.presenter.player.clock
IPresentationPlaybackCore ispring.presenter.player.core
IPresentationSlideView ispring.presenter.player.slides
IPresenter ispring.presenter.presentation
IPresenter2 ispring.presenter.presentation
ISlide ispring.presenter.presentation.slides
ISlide2 ispring.presenter.presentation.slides
ISlide3 ispring.presenter.presentation.slides
ISlideNotes ispring.presenter.presentation.slides
ISlidePlaybackController ispring.presenter.player.slides
ISlidePlayer ispring.presenter
ISlidePlayerContainer ispring.presenter
ISlideShowTransition ispring.presenter.presentation.slides
ISlideView ispring.presenter.player.slides
ISound ispring.utils.sound
ISoundAsset ispring.utils.assets
ISoundChannel ispring.utils.sound
ISoundController ispring.presenter.player.sound
IStandaloneSlideView ispring.presenter.player
ITimestamp ispring.presenter.presentation
IVideoPlaybackControllerFactory ispring.presenter.player.video
IVideoPlaybackControllerFactory2 ispring.presenter.player.video
IWebObject ispring.presenter.presentation.webobjects
IWebObjects ispring.presenter.presentation.webobjects
MediaPlaybackEvent ispring.presenter.player.media
MediaPlaybackEvent2 ispring.presenter.player.media
MetaCommandEvent ispring.presenter.player.events
PlaybackState ispring.presenter.player.media
PlayerContainerEvent ispring.presenter
PresentationClockEvent ispring.presenter.player.clock
PresentationClockEvent2 ispring.presenter.player.clock
PresentationClockState ispring.presenter.player.clock
PresentationClockState2 ispring.presenter.player.clock
SlidePlaybackEvent ispring.presenter.presentation.slides
SlideType ispring.presenter.presentation.slides
SoundControllerEvent ispring.presenter.player.sound
TooltipEvent ispring.presenter.player.events
TransitionEffectType ispring.presenter.presentation.slides