Topic: XML Path

Hi

I have purchased the Autoviewer yesterday and I think it's a great app, my only concern would be the implementation of an XMLPath variable.

I have tried to do it following the instructions in this post: http://www.airtightinteractive.com/foru … =flashvars, but with no success.

Here's what I did.

Step 1: Added this code in the XMLManager.as

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

Step 2: Added the parameter in the HTML

    <div id="flashcontent">SimpleViewer requires Macromedia Flash. <a href="http&#58;//www.macromedia.com/go/getflashplayer/">Get Macromedia Flash.</a> If you have Flash installed, <a href="index.html?detectflash=false">click to view gallery</a></div>    
    <script type="text/javascript">
        var fo = new FlashObject&#40;"viewer.swf", "viewer", "100%", "100%", "8", "#1D1816"&#41;;        
        fo.addParam&#40;"scale", "noscale"&#41;;
        fo.addParam&#40;"xmlDataPath", "test.xml"&#41;;
        fo.write&#40;"flashcontent"&#41;;    
    </script>

Could you tell me where I'm doing wrong?

Thx for your help,

Olivier

Re: XML Path

Hi,

I have tried harder on this but I really cant see where's the error coming from. I have the feeling the flash is not receiving well the fo.addParam("xmlDataPath", "test.xml") line. :?

Felix could you help me on that?

Thx a lot!

Olivier

Re: XML Path

Hi

I have fixed the case by using the UFO Flash Object (http://www.bobbyvandersluis.com/ufo/) instead of the SWFOject included with the Autoviewer.
The Action script was all good.

I also came with a nice way to use mulitple galleries.
Check it out: http://www.cedriclepeuch.com

Best,
Olivier

Re: XML Path

so do you receive the added parameter correctly with the UFO style of embeding?

Re: XML Path

yes

the script look sth like this:

<script type="text/javascript">
    var FO = &#123; movie&#58;"viewer.swf", width&#58;"100%", height&#58;"100%", majorversion&#58;"6", build&#58;"0" ,flashvars&#58;"xmlDataPath="yourgallery.xml" &#125;;
    UFO.create&#40;FO, "flashcontent"&#41;;
</script>

Re: XML Path

to be more exact cause you can't forget the background:

<script type="text/javascript"> 
   var FO = &#123; movie&#58;"viewer.swf", width&#58;"100%", height&#58;"100%", majorversion&#58;"6", build&#58;"0" , bgcolor&#58;"#181818", flashvars&#58;"xmlDataPath=yourgallery.xml" &#125;; 
   UFO.create&#40;FO, "flashcontent"&#41;; 
</script>

here is parameters samples from UFO
http://www.bobbyvandersluis.com/ufo/tes … arams.html