Topic: Images not in the "images/" directory? Solution

The T(r)ick
If your file are not in the default "images/" directory
(as requested by AutoViewer)

You can change the file name to somthing like this

<filename>../new_dir/your_image.jpg</filename>

Explanation
You "escape" from the directory with "../" and then set your custom directory

Re: Images not in the "images/" directory? Solution

So if I want to show a picture which is uploaded to another website like imageshack. how can I do it?

Re: Images not in the "images/" directory? Solution

This is the proffesional way:

You must edit the XMLManager.as, the function loadXML() on line 47

You must add the line

        if &#40;_root.imageFolderPath != undefined&#41; Options.imageFolderPath = _root.imageFolderPath;

Finished its like:
   

public function loadXML&#40;&#41;&#58;Void&#123;                                
        // Get xml data Path from flashVars or from Options.as
        if &#40;_root.xmlDataPath != undefined&#41; xmlResults.load&#40;_root.xmlDataPath&#41;;
        else xmlResults.load&#40;Options.XMLPath&#41;;                
        if &#40;_root.imageFolderPath != undefined&#41; Options.imageFolderPath = _root.imageFolderPath;
    &#125;    
    

Open the autoviewer.fla and File->Publish. Now you have your new viewer.swf on your deliver folder.

You must use in yours HTMLs something like this:

    <script type="text/javascript">
    var fo = new FlashObject&#40;"autoviewer/viewer.v2.swf", "viewer", "100%", "100%", "8", "#181818"&#41;;        
    fo.addParam&#40;"scale", "noscale"&#41;;
    fo.addVariable&#40;"xmlDataPath", "noticias/29/gallery.xml"&#41;;
    fo.addVariable&#40;"imageFolderPath", "noticias/29/images/"&#41;;
    fo.write&#40;"flashcontent"&#41;;    
    </script>    

Now you can modigy the imageFolderPath !!!
It works !!!

Re: Images not in the "images/" directory? Solution

Where is this file that you are saying should be modified? My package of autoviewer (not the pro version) only contains...

index.html
flashobject.js
gallerydata.xml
readme.txt
viewer.swf
/images

Where is this "XMLManager.as" that needs to be modified? Is it only in the "Pro" version?

Re: Images not in the "images/" directory? Solution

That's really great Tomas, thanks you, for your help. it really works. yikes

This is the proffesional way:

You must edit the XMLManager.as, the function loadXML() on line 47

You must add the line

        if &#40;_root.imageFolderPath != undefined&#41; Options.imageFolderPath = _root.imageFolderPath;

Finished its like:
   

public function loadXML&#40;&#41;&#58;Void&#123;                                
        // Get xml data Path from flashVars or from Options.as
        if &#40;_root.xmlDataPath != undefined&#41; xmlResults.load&#40;_root.xmlDataPath&#41;;
        else xmlResults.load&#40;Options.XMLPath&#41;;                
        if &#40;_root.imageFolderPath != undefined&#41; Options.imageFolderPath = _root.imageFolderPath;
    &#125;    
    

Open the autoviewer.fla and File->Publish. Now you have your new viewer.swf on your deliver folder.

You must use in yours HTMLs something like this:

    <script type="text/javascript">
    var fo = new FlashObject&#40;"autoviewer/viewer.v2.swf", "viewer", "100%", "100%", "8", "#181818"&#41;;        
    fo.addParam&#40;"scale", "noscale"&#41;;
    fo.addVariable&#40;"xmlDataPath", "noticias/29/gallery.xml"&#41;;
    fo.addVariable&#40;"imageFolderPath", "noticias/29/images/"&#41;;
    fo.write&#40;"flashcontent"&#41;;    
    </script>    

Now you can modigy the imageFolderPath !!!
It works !!!

Re: Images not in the "images/" directory? Solution

Sorry, cnymike, this is only possible in the pro version, because is a modification of the source code. NeverThere, I have done more modification to allow more paremeters (all of you want):

If you edit the file StageManager.as, in the line 46, function init() you can add this lines (or others for more parameters):

public function init&#40;target&#58;MovieClip&#41;&#58;Void&#123;
        
        
        // HTML FlashObject Param&#58; playAtStart
        if &#40;&#40;_root.playAtStart != undefined&#41; && &#40;_root.playAtStart == "false"&#41;&#41; Options.playAtStart = false;
        else Options.playAtStart = true;
        // HTML FlashObject Param&#58; showControlsAtStart
        if &#40;&#40;_root.showControlsAtStart != undefined&#41; && &#40;_root.showControlsAtStart == "false"&#41;&#41; Options.showControlsAtStart = false;
        else Options.showControlsAtStart = true;
        // HTML FlashObject Param&#58; enablePlayButton
        if &#40;&#40;_root.enablePlayButton != undefined&#41; && &#40;_root.enablePlayButton == "false"&#41;&#41; Options.enablePlayButton = false;
        else Options.enablePlayButton = true;
        // HTML FlashObject Param&#58; enableArrowButtons
        if &#40;&#40;_root.enableArrowButtons != undefined&#41; && &#40;_root.enableArrowButtons == "false"&#41;&#41; Options.enableArrowButtons = false;
        else Options.enableArrowButtons = true;
        // HTML FlashObject Param&#58; showCaptions
        if &#40;&#40;_root.showCaptions != undefined&#41; && &#40;_root.showCaptions == "false"&#41;&#41; Options.showCaptions = false;
        else Options.showCaptions = true;
        // HTML FlashObject Param&#58; showImageNumbers
        if &#40;&#40;_root.showImageNumbers != undefined&#41; && &#40;_root.showImageNumbers == "false"&#41;&#41; Options.showImageNumbers = false;
        else Options.showImageNumbers = true;

        mXMLManager = XMLManager.getInstance&#40;&#41;;        

        mClip_mc = target;

Then Publish and now you can use it with something like this:

    <script type="text/javascript">
    var fo = new FlashObject&#40;"autoviewer/viewer.swf", "viewer", "100%", "100%", "8", "#ffffff"&#41;;        
    fo.addParam&#40;"scale", "noscale"&#41;;
    fo.addVariable&#40;"playAtStart", "true"&#41;;
    fo.addVariable&#40;"showControlsAtStart", "false"&#41;;
    fo.addVariable&#40;"enablePlayButton", "false"&#41;;
    fo.addVariable&#40;"enableArrowButtons", "false"&#41;;
    fo.addVariable&#40;"showCaptions", "true"&#41;;
    fo.addVariable&#40;"showImageNumbers", "false"&#41;;
    fo.addVariable&#40;"xmlDataPath", "noticias/29/gallery.xml"&#41;;
    fo.addVariable&#40;"imageFolderPath", "noticias/29/images/"&#41;;
    fo.write&#40;"flashcontent"&#41;;    
    </script>    

You could add any parameter of the file Options.as easy
More power for autoviewer