In general, when you use FCPlayer to display images, you will want to provide a link to an image on your web page. When a user clicks the link, the FCPlayer media player will display the image.
We will begin by creating the link which will display your image. We will use the image samplepic.jpg, which is located in the FCPlayer/images folder.
<a onclick="return FCPlayer.display(
'/FCPlayer/images/samplepic.jpg'
);" href='/FCPlayer/images/samplepic.jpg' target=blank><img src='/FCPlayer/images/samplepic.jpg' border=0></a>
Cut and past the link code above into your web page.
Next, open your page in your web browser. Somewhere in your page, their should be a link to the samplepic image. Click on it, and FCPlayer will display the image.
In the link code above, the
FCPlayer.display function is telling FCPlayer to display the image
'samplepic.jpg' in the folder
/FCPlayer/images.. The FCPlayer.display function is placed in the link's
onclick handler so that it can be called when the link is clicked.
Let's say you have a picture called mycat.jpg, located at 'http://www.yoursite.com/images/mycat.jpg'. Instruct FCPlayer to display this picture by changing the link code above to:
<a onclick="return FCPlayer.display(
'http://www.yoursite.com/images/mycat.jpg'
);" href='http://www.yoursite.com/images/mycat.jpg' target=blank>This is my cat!</a>
That's it. Open your web page again to view the picture.
Now let's add a caption to the example above:
<a onclick="return FCPlayer.display(
'http://www.yoursite.com/images/mycat.jpg',
{
caption:'This is my cat',
captionText:'Caption',
captionWidth:'250'
}
);" href='http://www.yoursite.com/images/mycat.jpg' target=blank>This is my cat!</a>
Your picture would now have a caption.
You use the FCPlayer.display function to communicate with the FCPlayer image player.
The general form of this function is: