This class extends the standard MovieClipLoader class available since Adobe Flash Player 7 and simplifies the process of iSpring generated Flash movies loading.
This class is not a part of the ActionScript API provided by generated Flash movies. A source code of this class is included into the fsplayer.api package.
The following methods and properties are provided by the CPresentationLoader class:
Method | Description |
---|---|
CPresentationLoader() | Class constructor. It is used to create instances of the CPresentationLoader class |
setPlayerListener(listener:IPlayerListener):Void | This method passes the IPlayerListener interface to the loader. The passed listener object will receive a notification when player is initialized |
loadClip(url:String, target:MovieClip):Void | This method loads iSpring generated presentation into the specified movie clip |
Property | Type | Description |
---|---|---|
player | IPlayer | Returns the reference to the player in loaded Flash presentation |
bytesLoaded | Number | Returns number of loaded bytes of the Flash presentation |
bytesTotal | Number | Returns total number of bytes of the Flash presentation |
Samples
The following example illustrates the usage of the CPresentationLoader class.
import fsplayer.api.*; var loader:CPresentationLoader = new CPresentationLoader(); // this object (in our case it is _root MovieClip) will listening to the player loader.setPlayerListener(this); // load generated Flash presentation loader.loadClip("presentation.swf", presentation); // this method is invoked when player gets initialized function onPlayerInit(p:IPlayer):Void { // add your extra initialization code here }