When creating slide shows for Mizzou Wire, I wanted them to look similar to the normal photos with each story: an inset image with a caption underneath (an example). Out-of-the-box, Slideshow Pro presents photo captions as an overlay when you mouse over the image. In order to have captions formatted the way I wanted, below the image and slide navigation, I had to do some customization. It required a bit of ActionScript coding, but with the help of the SSP Customization Guide and the user forums, I was able to figure it out.
Turn off captions in the component
First, create a slide show like you normally would in Flash. In the Component Inspector set Caption Appearance to Hidden.
Give the component an instance name
Next select the SSP component and give it the instance name 'my_ssp'.
Create text fields for the captions
Now increase the size of your flash document to allow space for your caption below the slide show component.
Create two text fields under the slide show. One will be a single line for the image count and the other will be a multiline for the caption.
Header text field options
Select the text box for the image count and adjust its properties. make it a dynamic text field with an instance name of 'header_ta'. Then set it to a single line field with Selectable and Render Text as HTML buttons pressed.
Caption text field options
Select the text box for the captions and adjust its properties. make it a dynamic text field with an instance name of caption_ta'. Then set it to a multiline field with Selectable and Render Text as HTML buttons pressed.
Create an actions layer
Next, create a new layer in your document and lable it 'Actions'. With this layer selected, open the Actions window and paste in the following ActionScript.
Add the ActionScript
sspListener = new Object();
sspListener.onAlbumData = function(eventObject) {
totalImages = eventObject.data.totalImages;
}
sspListener.onImageData = function(eventObject) {
currentImage = eventObject.data.number;
header_ta.htmlText = "<b>Image " + currentImage + " of " + totalImages + "</b>";
caption_ta.htmlText = eventObject.data.caption;
}
my_ssp.addEventListener("onImageData",sspListener);
my_ssp.addEventListener("onAlbumData",sspListener);
Test your slide show
Save everything and publish out your SWF, link it to an XML file and embed it on the page just like you normally would. If everything is goes right, you should new have captions below the images and slide navigation.
Tweaking caption space
Since Flash doesn't expand to fit content, you have to make the caption field tall enough for your longest caption. If you don't have enough room, Flash will just cut it off. be sure to check your captions to make sure they are all there. You might have to go back to your Flash file and make some room. Remember, if you change the dimensions of your flash file, you also have to change the dimensions in the embed script or your captions will still get cut off on the bottom.
Leave a comment
Note: Comments are moderated. If published, comments may be edited for length, style and clarity.