Topic: SV2 pro and fotomoto

Hi everyone !

I have several SV2-pro galleries embed into my website made in flash.
I would like to use fotomoto when I click on the displayed image like Mike Richards website: http://www.mikerichardsphotography.com/ … tions_1/0/

I wonder how can I get this done exactly ?

Thanx a lot !

Re: SV2 pro and fotomoto

Hi, glad to hear you like my site.  smile

SimpleViewer 2 Pro:

You need to load the simpleviewer.swf into another swf and then for image click you place a transparent button over where your images are. Note you wont be able to use the on image navigation and you will need to make your gallery size static. You then need to setup the SimpleViewer API, an event listener that calls purchaseImage when the button is clicked and add svAPI.addEventListener("svImageChange",checkImage); to onGalleryLoaded. You can find an example of embeding SimpleViewer into a swf and using the API in the examples\flash_embed folder of the Pro download. Finally add the following code to your ActionScript and gallery HTML page.

ActionScript

//passes the image url to the checkinImage fotomoto JavaScript function
function checkImage(e:Event) {
    var imageInfo:Object = svAPI.getImageInfo(svAPI.getImageIndex());
    var imgURL:String = imageInfo.imageURL;
    ExternalInterface.call('fmCheckImage',imgURL);
}
//passes the image url to the showWindow fotomoto JavaScript function
function purchaseImage(e:Event) {
    var imageInfo:Object = svAPI.getImageInfo(svAPI.getImageIndex());
    var imgURL:String = imageInfo.imageURL;
    ExternalInterface.call('fmWindow',imgURL);
}

Javascript in your gallery html:

    <script type='text/javascript'>var fotomoto_api_mode = true;</script>
    <script type='text/javascript' src='http://widget.fotomoto.com/stores/script/_yourFotoMotoID_.js'></script>
    <script type='text/javascript'>
        //this opens the fotomoto window with the image info.
        function fmWindow(theImage) {
            FOTOMOTO.API.showWindow(100, theImage);
        }
        //As people browser through your gallery this checks to see if the image is in fotomoto
        //It will add the image if it isn't and if it is it will update the number of times viewed.
        function fmCheckImage(theImage) {
            FOTOMOTO.API.checkinImage(theImage);
        }
    </script>
Mike Richards
SimpleViewer Support Team.

Re: SV2 pro and fotomoto

I threw up a blog post with an example download.

Mike Richards
SimpleViewer Support Team.

Re: SV2 pro and fotomoto

Thanx  a lot !

That's more than I could expected  big_smile