Topic: Oddness with automated XML file

Sorry I had posted an earlier message about this in the wrong forum, but here it is:

autoviewer1-4.

I works here: http://www.tranquilphotos.com/gallery/L … /index.php.  As you can see there has been some changes to the code, very minor to just add in a watermark that randomly moves around.

Now I decided to make the XML file a dynamic file, so all I did was copy the source, and change options.as to point to a PHP script that looks at the pics folder and generates the XML.   I also found out that if your caption tag is last it starts doing some strange stuff.   But anyway.

Here is the result, there are 14 images in the directory that it should read, very strange results: http://www.mbcli.com/~awm/gtest/index.html.

I ran the output of the PHP through XMLSpy and it is clean and valid.  There are no errors or warnings when I publish the project.

P.S. The reason I'm reposting is that I tought the caption problem was my only issue, as if you use 2-3 images are vertical it works fine.  Obviously with a mix and 14 images it does not.

Last edited by aram535 (2009-10-13 00:12:44)

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

I was reading the flash debugging information on the blog, I'm having a hard time even debugging this issue with the tools mentioned. Is there a better debugging tool that I could be looking into?

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

It seems to be working now did you figure it out?

Mike Richards
SimpleViewer Support Team.

Re: Oddness with automated XML file

No, still not working.  I posted two versions, one is working with static XML file, one is failing with the dynamic XML file.

This is the one that is failing:
http://www.mbcli.com/~awm/gtest/index.html

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

Is your XML output using UTF-8 encoding? Flash requires UTF-8.

Felix Turner
SimpleViewer Support Team.

Re: Oddness with automated XML file

It is .. .

Here are some of the initial couple of lines.

<?xml version="1.0" encoding="UTF-8"?>
<gallery displayTime="6" enableRightClickOpen="false" frameColor="0xFFFFFF" frameWidth="0" imagePadding="20">
  <image>

There are no non-standard characters anyway, but it's encoded none-the-less.

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

Thought of another test, if I just run the program: php ./generate.php > gallery.xml  than use the standard autoviewer.swf it is still screwed up, but not as much.  The first image (vertical) is covered with a horizontal image, but the rest seem to be ok, until you get to the end.

With the autoviewer.swf that points to the XML generator.php everything seems to be loading on top of the first image.

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

Further update and debugging.

I have narrowed the problem down either a "load" problem or "Hide after load" problem.

If you have let's say 15 images in the directory, it screws up the first image ... i.e.Multiple images are loaded in.

However, if you remove all of the images, refresh browser, add one in, refresh, add next one, refresh ... so on.

It works fine. If you close the browser go back to the same page, it is screwed up all over again.   Multiple images get loaded on top of the image image.

Not sure what else I can do at this point.  I'm about to give up on the product.  I have the source code obviously but just have absolutely no experience in debugging flash code any further.

Last edited by aram535 (2009-10-24 13:12:13)

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

Hi,

seems like there are 2 separate issues here:
1) PHP generated XML is not being read properly by AutoViewer.
2) Edits to the AutoViewer source code are causing the images not to be laid out properly.

What happens when you pipe the XML into the original autoviewer? If the positioning is off that means the height and width of the images is not being written properly in te XML.

Unfortunately we cannot provide more than general support for mods to the source code.

"Please note that the AutoViewer-Pro source code is provided 'as-is' to allow people with ActionScript experience to modify as required. Airtight Interactive cannot provide support for all possible modifications to the source code and cannot provide tutorials on how to code ActionScript."

Felix Turner
SimpleViewer Support Team.

Re: Oddness with automated XML file

I just copied the original flash file into the directory and used the PHP to generate the gallery.xml file and it is still messing up the images, so there is no doubt that the PHP generator seems to be the problem.

According to XMLSpy though the file is a valid XML file, there no weird characters or spaces in the names.  Is there a Schema that I can validate against?  I cannot see any issues looking at it.

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

whats the url?

Felix Turner
SimpleViewer Support Team.

Re: Oddness with automated XML file

Here is the original autoviewer:
http://www.mbcli.com/~awm/g2/

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

i think the prob is that one of your image tags is missing a width and height.

Felix Turner
SimpleViewer Support Team.

Re: Oddness with automated XML file

Grrr.  You're right, there was an extra file in there that was being grabbed by the php script.  I'll try the same fix with my version.

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

aram535, how did you change options.as to point to a PHP script? I'm trying to do the same thing in the SimpleViewer but I cannot find how to point the viewer to my PHP script.

Re: Oddness with automated XML file

This is for 'autoviewer', I cannot tell you what it is for simpleviewer.  It's just a string variable in the Options.as file:

    //data options
    static var XMLPath:String = "whatever.php"; //Relative or absolute path to XML file

[url]http://www.tranquilphotos.com[/url]

Re: Oddness with automated XML file

You can also set the XML URL in the HTML doc:

For SimpleViewer use 'xmlDataPath': http://www.simpleviewer.net/simpleviewer/options.html

For autoviewer use 'xmlURL': http://www.simpleviewer.net/autoviewer/options.html

Felix Turner
SimpleViewer Support Team.

Re: Oddness with automated XML file

Awesome, it worked!! You guys rock thanks.