Instantiating SlideShoPro in an AS3.0 Class

A simple user class:

package
{
	import flash.display.DisplayObjectContainer;
	import flash.display.Sprite;

	import com.slideshow.MySlideShowPro;

	public class Main extends Sprite
	{
		private var mssp:DisplayObjectContainer;

		public function Main()
		{
			mssp = new MySlideShowPro(500, 350); //(width, height)
			mssp.x = 20;
			mssp.y = 20;
			addChild(mssp);
		}

	}
}

A sample basic SlideShowPro class:

package com.slideshow
{
	import flash.display.Sprite;
	import net.slideshowpro.slideshowpro.*;

	public class MySlideShowPro extends Sprite
	{
		//http://wiki.slideshowpro.net/SSPplayer/API-API
		private var myssp:SlideShowPro;

		public function MySlideShowPro(w:int, h:int)
		{
			//make sure SlideShowPro is set for Export in your Library, or SWC/SWF asset files
			myssp = new SlideShowPro(this);

			myssp.setSize(w, h);

			myssp.xmlFilePath = "xml/slides.xml";
			myssp.xmlFileType = "Default";

			/*
			the commented out lines, like:
			//myssp.navButtonGlowAlpha = .25;
			give error "1119: access of possibly undefined property..."
			*/

			myssp.navAppearance = "Always Visible";
			myssp.navBackgroundAlpha = 1;
			myssp.navBackgroundColor = 0x121212;
			myssp.navButtonsAppearance = "All Visible";
			myssp.navGradientAlpha = .3;
			myssp.navGradientAppearance = "Glass Dark";
			myssp.navButtonColor = 0xEEEEEE;
			//myssp.navButtonGlowAlpha = .25; 				//error 1119
			//myssp.navButtonGradientAlpha = .6;			//error 1119
			myssp.navButtonInactiveAlpha = .4;
			//myssp.navButtonRolloverColor = 0xFFFFFF;		//error 1119...
			myssp.navButtonShadowAlpha = .6;
			//myssp.navButtonShadowStyle = "Under";
			//myssp.navLinkAnimate = "On";
			myssp.navLinkAppearance = "Numbers";
			//myssp.navLinkActiveColor = 0xEEEEEE;
			//myssp.navLinkInactiveColor = 0x999999;
			myssp.navLinkPreviewAppearance = "Visible";
			myssp.navLinkPreviewBackgroundAlpha = 1;
			myssp.navLinkPreviewBackgroundColor = 0xFFFFFF;
			myssp.navLinkPreviewScale = "Proportional";
			myssp.navLinkPreviewSize = [100,100];
			myssp.navLinkPreviewStrokeWeight = 1;
			myssp.navLinkRolloverColor = 0xFFFFFF;
			//myssp.navLinkShadowAlpha = .6;
			myssp.navLinksBackgroundAlpha = 1;
			myssp.navLinksBackgroundColor = 0x000000;
			//myssp.navLinksBackgroundShadowAlpha = .6;
			myssp.navLinkSpacing = 8;
			myssp.navNumberLinkSize = 9;
			myssp.navPosition = "Bottom";
			myssp.navThumbLinkInactiveAlpha = 1;
			myssp.navThumbLinkSize = [16,16];
			myssp.navThumbLinkStrokeWeight = 1;

			myssp.albumBackgroundAlpha = 1;
			myssp.albumBackgroundColor = 0x303030;
			myssp.albumDescColor = 0xCCCCCC;
			myssp.albumDescSize = 9;
			myssp.albumPadding = 8;
			myssp.albumPreviewScale = "Proportional";
			myssp.albumPreviewSize = [54,41];
			myssp.albumPreviewStrokeColor = 0xFFFFFF;
			myssp.albumPreviewStrokeWeight = 1;
			myssp.albumPreviewStyle = "Inline Left";
			myssp.albumRolloverColor = 0x262626;
			myssp.albumStrokeAppearance = "Visible";
			myssp.albumStrokeColor = 0x141414;
			myssp.albumTitleColor = 0xFFFFFF;
			myssp.albumTitleSize = 10;
			myssp.audioAutoStart = "On";
			myssp.audioLoop = "Off";
			myssp.audioPause = "Off";
			myssp.audioVolume = .8;
			myssp.autoFinishMode = "Switch";
			myssp.cacheContent = "None";
			myssp.captionAppearance = "Overlay on Rollover (if Available)";
			myssp.captionBackgroundAlpha = .6;
			myssp.captionBackgroundColor = 0xFFFFFF;
			myssp.captionElements = "Header and Caption";
			myssp.captionHeaderBackgroundAlpha = 0;
			//myssp.captionHeaderPadding = [6,6,2,6];
			myssp.captionHeaderText = "{imageTitle}";
			//myssp.captionHeaderTextColor = 0xEEEEEE;
			myssp.captionPadding = [2,6,6,6];
			myssp.captionPosition = "Top";
			myssp.captionTextAlignment = "Left";
			myssp.captionTextColor = 0xAAAAAA;
			//myssp.captionTextShadowAlpha = 0;
			myssp.captionTextSize = 9;
			myssp.contentAlign = "Center";
			myssp.contentAreaAction = "Launch Hyperlink";
			myssp.contentAreaBackgroundAlpha = 1;
			myssp.contentAreaBackgroundColor = 0x161616;
			myssp.contentAreaInteractivity = "Action Area Only";
			myssp.contentAreaStrokeAppearance = "Visible";
			myssp.contentAreaStrokeColor = 0x262626;
			myssp.contentFrameAlpha = 1;
			myssp.contentFrameColor = 0x262626;
			myssp.contentFramePadding = 0;
			myssp.contentFrameStrokeAppearance = "Hidden";
			myssp.contentFrameStrokeColor = 0x333333;
			myssp.contentOrder = "Sequential";
			myssp.contentScale = "Downscale Only";
			myssp.contentScalePercent = 1;
			myssp.contentWatermark = "";
			myssp.contentWatermarkAlign = "Bottom Right";
			myssp.directorLargePublishing = "On";
			myssp.directorLargeQuality = 80;
			myssp.directorLargeSharpening = 1;
			myssp.directorThumbQuality = 60;
			myssp.directorThumbSharpening = 1;

			myssp.displayMode = "Auto";
			myssp.feedbackBackgroundAlpha = .3;
			myssp.feedbackBackgroundColor = 0x000000;
			myssp.feedbackHighlightAlpha = .8;
			myssp.feedbackHighlightColor = 0xFFFFFF;
			myssp.feedbackPreloaderAlign = "Center";
			myssp.feedbackPreloaderAppearance = "Beam";
			myssp.feedbackPreloaderPosition = "Inside Content Area";
			myssp.feedbackPreloaderScale = 1;
			myssp.feedbackPreloaderTextSize = 12;
			myssp.feedbackTimerAlign = "Top Right";
			myssp.feedbackTimerAppearance = "Visible";
			myssp.feedbackTimerPosition = "Inside Content Area";
			myssp.feedbackTimerScale = 1;
			myssp.feedbackVideoButtonScale = 1;
			myssp.fullScreenReformat = "On";
			myssp.fullScreenTakeOver = "On";
			myssp.galleryAppearance = "Visible";
			myssp.galleryBackgroundAlpha = 1;
			myssp.galleryBackgroundColor = 0x1C1C1C;
			myssp.galleryColumns = 2;
			//myssp.galleryContentShadowAlpha = 0;
			myssp.galleryOrder = "Left to Right";
			myssp.galleryPadding = 10;
			myssp.galleryRows = 4;
			myssp.galleryNavActiveColor = 0x303030;
			myssp.galleryNavAppearance = "Visible";
			myssp.galleryNavInactiveColor = 0x000000;
			myssp.galleryNavRolloverColor = 0x262626;
			myssp.galleryNavStrokeAppearance = "Visible";
			myssp.galleryNavStrokeColor = 0x141414;
			myssp.galleryNavTextColor = 0xCCCCCC;
			myssp.galleryNavTextSize = 9;
			myssp.keyboardControl = "On";
			//myssp.loop = "Off";
			myssp.mediaPlayerAppearance = "Visible on Rollover";
			myssp.mediaPlayerBackgroundAlpha = .25;
			myssp.mediaPlayerBackgroundColor = 0x000000;
			myssp.mediaPlayerBufferColor = 0x000000;
			myssp.mediaPlayerButtonColor = 0xFFFFFF;
			myssp.mediaPlayerElapsedBackgroundColor = 0xFFFFFF;
			myssp.mediaPlayerElapsedTextColor = 0x000000;
			myssp.mediaPlayerPosition = "Bottom";
			myssp.mediaPlayerProgressColor = 0xCCCCCC;
			myssp.mediaPlayerScale = .8;
			myssp.mediaPlayerTextColor = 0x999999;
			myssp.mediaPlayerTextSize = 9;
			myssp.mediaPlayerVolumeBackgroundColor = 0x000000;
			myssp.mediaPlayerVolumeHighlightColor = 0xCCCCCC;
			myssp.panZoom = "Off";
			myssp.panZoomDirection = "Random";
			myssp.panZoomFinish = "Off";
			myssp.panZoomScale = [1,1.2];
			myssp.permalinks = "Off";
			myssp.smoothing = "On";
			//myssp.soundEffects = "";
			//myssp.soundEffectsVolume = .4;
			myssp.textStrings = ["Previous Screen","Next Screen","Screen","of","No caption","No title","Playing","Paused","Click play to start audio"];
			myssp.toolAppearanceContentArea = "Hidden";
			myssp.toolAppearanceNav = "Visible";
			myssp.toolColor = 0x222222;
			myssp.toolDelayContentArea = 0;
			myssp.toolDelayNav = .5;
			myssp.toolLabels = ["Gallery","Previous Group","Previous","Next","Next Group","Pause","Play","Full Screen","Normal Screen","Open Link"];
			myssp.toolTimeoutContentArea = 0;
			myssp.transitionLength = 2;
			myssp.transitionPause = 4;
			myssp.transitionDirection = "Left to Right";
			myssp.transitionStyle = "Cross Fade";
			myssp.typeface = "Lucida Grande,Lucida Sans Unicode,Verdana,Arial,_sans";
			//myssp.typefaceAntiAlias = "Advanced";
			myssp.typefaceEmbed = "Off";
			myssp.videoAutoStart = "On";
			myssp.videoBufferTime = 0.1;
		}
	}
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s