Topic: Absolute position of gallery thumbs to image

I am trying to create a photography portfolio site for my partner :

http://www.gubbagubba.com/downloads/FF_ … allery.jpg

I need to absolutely position the thumbnail gallery, and customise the gallery navigation and slide-show play buttons.

Any pointers on how I can achieve this?

My other question is positioning of the site menu, I had thought of using a DIV over the flash file and pointing to each separate gallery which would be embedded in a seperate HTML file, again this would have to be position absolutely in relation to the gallery and gallery thumbs.

My thanks in advance.

Adam

Re: Absolute position of gallery thumbs to image

I need to absolutely position the thumbnail gallery

You can use the fixed layout options to postition pieces of the gallery absolutely.

customise the gallery navigation and slide-show play buttons

To have custom buttons you need to load the simpleviewer.swf into another swf and use the API. See the Flash embed example provided with the pro download.

Below is the navigation logic I use in my site.

/**
* Fired when preloader is available
* Can set flashvars at this point
*/
function onViewerInit(e:Event):void{
    trace("onViewerInit");
    //listen for
    Object(svLoader.content).addEventListener("svComplete", onGalleryLoaded);

    trace("setViewerFlashVars");
    var options:Object = Object(svLoader.content).embedOptions;

    
    options.titleY="585"
    
    //clear old btn instances
    if (thumbBackBtn != null && contains(thumbBackBtn)) {
        removeChild( thumbBackBtn );
    }
    if (thumbNextBtn != null && contains(thumbNextBtn)) {
        removeChild( thumbNextBtn );
    }
    
    
    //create an instance and add it to the display list:
    thumbBackBtn = new ThumbBackButton();
    addChild( thumbBackBtn );
    thumbNextBtn = new ThumbNextButton();
    addChild( thumbNextBtn );
    
    thumbBackBtn.addEventListener(MouseEvent.CLICK,showPreviousThumbPage);
    thumbNextBtn.addEventListener(MouseEvent.CLICK,showNextThumbPage);
    
    thumbBackBtn.visible = false;
    thumbNextBtn.visible = false;

    thumbBackBtn.x = 668;
    thumbBackBtn.y = 347;
    thumbNextBtn.x = 778.7;
    thumbNextBtn.y = 347;
    
}
/**
 * Fired when gallery has completly loaded (SWF +  XML)
 * API is now available.
 */
function onGalleryLoaded(e:Event):void{
    svAPI = Object(svLoader.content).api;
    //Init Event Listeners
    svAPI.addEventListener("svPageChange",updateThumbNav);
}
/*
* Next navigation arrows logic
*/
function showNextThumbPage(e:Event):void{
    var galleryInfo:Object = svAPI.getGalleryInfo();
    svAPI.showThumbPage(svAPI.getThumbPageIndex()+1);
}
/*
* Back navigation arrows logic
*/
function showPreviousThumbPage(e:Event):void{
    var galleryInfo:Object = svAPI.getGalleryInfo();
    svAPI.showThumbPage(svAPI.getThumbPageIndex()-1);
}
/*
* Updates the visibility of the navigation arrows
*/
function updateThumbNav(e:Event):void{
    var galleryInfo:Object = svAPI.getGalleryInfo();
    if(galleryInfo.thumbPageCount == 1){
        thumbBackBtn.visible = false;
        thumbNextBtn.visible = false;
    }else{
        thumbBackBtn.visible = svAPI.getThumbPageIndex() > 0;
        thumbNextBtn.visible = svAPI.getThumbPageIndex() < (galleryInfo.thumbPageCount-1);
    }
}

My other question is positioning of the site menu, I had thought of using a DIV over the flash file and pointing to each separate gallery which would be embedded in a seperate HTML file, again this would have to be position absolutely in relation to the gallery and gallery thumbs.

So what exactly is your question?

Mike Richards
SimpleViewer Support Team.