Topic: two auto viewers in one projetc

hi
i would like some help to embed two viewers into one flash project.
how do i do this?
thanks

Re: two auto viewers in one projetc

Take a look at the 'Flash Embed' and 'HTML Embed' folders in the 'autoviewer_pro/examples/' folder of your AutoViewer Pro download package.
There are both Flash and HTML examples for embedding multiple galleries.

Steven Speirs
SimpleViewer Support Team.

Re: two auto viewers in one projetc

still having problems
ive edited the Options.as file and changed the xml and image path.
then i published the autoViewer.fla, got the viewer.swf from deliver and loaded it in flash
the problem is that the viewer in flash is targeting the wrong paths.

ive set up two folders. fiere and showroom. in both folders i have an xml file for the images' paths (which calls the images from the same location as this xml) and the viewer (published after changing the Options.as and saving, twice, once for fiere and another for showroom, aka with the correct paths).

in flash i did this

mcLoader.loadMovie(viewerPath);

and for each section of my project (fiere and showroom) i gave the mcLoader the correct path to the viewer through the variable viewerPath. in fiere it target autoViewer/fiere/viewer.swf. in shoroomw, etc with 'showroom'

and something deeply wrong happens

in both sections i call the viewer from, it always targets the last paths i saved in Options.as (and published through autoviewer.fla)

why?

Re: two auto viewers in one projetc

anyone?

Last edited by ricmetal (2011-04-04 09:42:26)

Re: two auto viewers in one projetc

in both sections i call the viewer from, it always targets the last paths i saved in Options.as

This is because the AS code is shared between the SWFs so options set in one SWF will affect the other. The solution is to explicitly set the pro options in the embedding ActionScript as in the "multiple_galleries.fla" example:

function onLoadInit(){
    
    //set gallery specific options
    if (galleryId == 1){
        com.airtightinteractive.apps.viewers.autoViewer.Options.enablePlayButton = true; 
    }else{
        com.airtightinteractive.apps.viewers.autoViewer.Options.enablePlayButton = false; 
    }
}
Felix Turner
SimpleViewer Support Team.