Topic: Autoviewer SWF Loading Issue

Felix,
   I'm trying to load Autoviewer PRO into a flash movie, actionscripted for multiple galleries.  (I did it exactly as you did in the Simpleviewer Multiple Galleries FLA example, but swapped viewers and changed imageData.xml to gallerydata.xml in the actionscript.)

Mine loads but STOPS at the words 'loading autoviewer'!

Quadruple-checked the locations of my images and xml files, and I have everything positioned exactly as you did in the example.

Please help!  It seems like a simple issue.

This question has been asked repeatedly on the forum and never answered as far as I can tell.


Ken

Re: Autoviewer SWF Loading Issue

Autoviewer is not setup to accept the 'xmlDataPath' variable in the same way as SimpleViewer. The reccomended way to set the xmlDataPath for autoviewer is to set the 'XMLPath' AS option, then republish your swf.

Admittedly this is not as convenient as setting the xmlDataPath in the HTML embed code. If you want to have AutoViewer read in the xmlDataPath from the HTML embed code, make the following change in XMLManager.as.

Replace

public function loadXML():Void{                                
    xmlResults.load(Options.XMLPath);                
}    

with

public function loadXML():Void{        
    var xmlPath:String = Options.XMLPath;
    if (_root.xmlDataPath != undefined){
        xmlPath = _root.xmlDataPath;
    }                        
    xmlResults.load(xmlPath);                
}

Republish your SWF. Now you can use the same method as SimpleViewer for setting the xmlData path via the HTML embed code ( described here ).

Felix Turner
SimpleViewer Support Team.

Re: Autoviewer SWF Loading Issue

This worked perfectly Felix, thanks for the quick reply! 

My only problem now is that AV is looking for the 'images' folder in the main folder (same location as viewer.swf) instead of the folder where the xml is located.  Remember, I'm calling multiple galleries.

What else do I need to fix that?


thanks,
  Ken

Re: Autoviewer SWF Loading Issue

Easiest solution is to use absolute image URLs in the XML doc. You will also need to set the useAbsoluteImagePaths AS option to true: http://www.airtightinteractive.com/proj … tions.html

Felix Turner
SimpleViewer Support Team.

Re: Autoviewer SWF Loading Issue

Thanks Felix.  As a compromise I decided to put all my images in one folder and then use actionscript to load my custom xmls... such as 'weddings.xml'.

For those checking this out later, it looks like this:

yourButton.onRelease = function(){
    loadGallery("landscapes");   
}

function loadGallery(galName){
    _root.xmlDataPath = galName + ".xml";  
    yourPicContainer.loadMovie("viewer.swf");
}

Ken