FCPlayer How-tos

IndexHow to display a picture.



where is it
After installing FCplayer in your web page, you are ready to start displaying images using the built in FCPlayer.display function. FCPlayer can display any image format that a web browser can handle. This means jpg's, gif's, png's etc.

Getting Started

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.



An example: Displaying your own images.

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.


Another example: Placing a caption in your image.

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.



The FCPlayer.display function

You use the FCPlayer.display function to communicate with the FCPlayer image player.

The general form of this function is:

FCPlayer.play( url, [options] )

FCPlayer.display takes two arguments:

url: (String)
The url of the image file.

options: (object)
Defines various options that will be used with the image.


The options argument is optional.
For more info: A list of the optional parameters for use with FCPlayer.display




If you have a pre-sales question, submit your inquiry via our sales contact page. For general, non-sales inquiries, contact us at support@fastcatsoftware.com.

Solution Graphics