|
|||||||||||||||||
|
|
Skin development
iSpring provides Flash developers with custom skin development facilities. Creation of a custom skin is a quite easy task for developers familiar with Flash 7 or 8 and ActionScript 2.0. Each skin is just an ordinary Flash file with the only feature - the first frame of its main (aka _root) MovieClip contains the following function. function createSkin(target:MovieClip):fsplayer.ui.skins.ISkin; The target parameter is a MovieClip object where skin must create user interface objects. The createSkin() function is called by the player core. It must return a newly created object implementing fsplayer.ui.skins.ISkin Interface. Visibility of the passed target MovieClip can be controlled by the Flash presentation preloader. When the skin is created, the player is initialized. Player initialization scheme is illustrated in the following diagram.
The following interfaces are used for the development of custom skins. They are located within fsplayer.ui.skins package.
SamplesA typical implementation of the createSkin() function is as follows:
import fsplayer.ui.skins.ISkin;
import MySkin;
function createSkin(target:MovieClip):ISkin
{
return new MySkin(target);
}
MySkin class can be declared in the following way:
import fsplayer.ui.skins.ISkin;
class MySkin implements ISkin
{
// implementation of ISkin interface methods
}
A minimal implementation of the ISkin interface can be found in the sampes section of the ISkin interface description. See alsoISkin Interface |
|||||||||||||||
|
|||||||||||||||||