Topic: Examples (particularly API) Don't work

Hi,

Just purchased sv pro 2.01 today.

Testing the examples (locally) I'm finding that a lot of them have problems.

1) On many of the gallery examples the first image has a text link back to the site - this doesn't do anything. The only thing that is possible is to (right click) copy the link. Clicking or right click  and selecting open new window does nothing.

2) In the HTML_embed folder the javascript API example doesn't work at all. Admittedly I still use IE 6 but also have Firefox 3.0.6. Console errors are :

Error: svAPI is undefined
Source File: file:///E:/sv/simpleviewer-pro/examples/HTML_embed/javascript_api.html
Line: 102

Different lines for different buttons but same error on every button.

I've altered an external  link to swfobject in the code to point to the local version to no avail but I suspect this isn't where the missing code is at any rate.

The link in the file is dead :
http://www.airtightinteractive.com/simp … t/api.html

3) An icon to open in new window (usually top right) on any of the galleries doesn't do anything.

Would appreciate some idea of what's wrong. I presume that these examples should have no problem running locally.


Edit: Just tested the online example and it works ok. So do the links and the open new window button. The latter also works locally but only if simpleviewer is opened in flash player directly.

--------------------------------------------------------------------------------------
OS Type,OS Version,Browser Type,IP Address,Javascript Enabled,Cookies Enabled,Color Depth,Screen Resolution,Browser Window Size,Flash Version,Full Flash Version
"Microsoft Windows","XP","Firefox 3.0.6","xx.xx.xx.xx","Yes""Yes","32 bit","1024 x 768","965 x 542","10","10.0.12"
---------------------------------------------------------------------------------------

Last edited by louiscar (2010-02-03 06:21:45)

Re: Examples (particularly API) Don't work

Hi,

some browsers (particularly IE6) may have problems with the external links when running locally. This is due to security settings in the browser. When running online there should be no issues.

Felix Turner
SimpleViewer Support Team.

Re: Examples (particularly API) Don't work

Felix wrote:

Hi,

some browsers (particularly IE6) may have problems with the external links when running locally. This is due to security settings in the browser. When running online there should be no issues.

Hi Felix,

All the above tests are with Firefox. This is an issue for both browsers and I presume this would be the same with any other browser.

I am also now finding that I can't convert an existing 1.9 gallery to 2.01. Folllowing the upgrade options all I get is big crosses on the thumbnails and main image. Caption and text come up ok. So conversion isn't as simple as it stated in the upgrade notes.

I've even copied the jscript line found in the example 'classic.html' to no avail.

Changing this :

<script type="text/javascript">
var fo = new SWFObject("ext/viewer.swf", "viewer", "100%", "100%", "7", "#191919");
fo.addVariable("preloaderColor", "0xffffff");
fo.addVariable("xmlDataPath", "gallery.xml");
fo.addVariable("fontColor", "0xffffff");
fo.addVariable("footer", "%3Ca href=%22index.html%22%3E%3Cu%3EHome%3C/u%3E%3C/a%3E");
fo.write("flashcontent");
</script>

To this:

<script type="text/javascript">
var fo = new SWFObject("ext/simpleviewer.swf", "viewer", "100%", "100%", "7", "#191919");
fo.addVariable("preloaderColor", "0xffffff");
fo.addVariable("xmlDataPath", "gallery.xml");
fo.addVariable("fontColor", "0xffffff");
fo.addVariable("footer", "%3Ca href=%22index.html%22%3E%3Cu%3EHome%3C/u%3E%3C/a%3E");
fo.write("flashcontent");
add fo.addParam("allowFullScreen","true");
add fo.addParam("allowScriptAccess","always")
</script>

I am a bit disappointed and frustrated now having paid again for this in the hope of getting these extra facilities.

EDIT: ok it looks like the issue might be with the generation of Porta's version of gallery.xml
In it's version it uses the <name> tag which should be changed to <filename>

However, if the following code is included a blank page is rendered;

add fo.addParam("allowFullScreen","true");
add fo.addParam("allowScriptAccess","always")

In order to get this to work I excluded or changed them to

var flashvars = {};
flashvars.galleryURL = "gallery.xml";
var params = {};
params.allowfullscreen = true;
params.allowscriptaccess = "always";

As I say it's not so straight forward and perhaps a clearer explanation of the differnces of these methods and pitfalls might help in the upgrade notes or some extra code to ensure downward compatibility of the gallery.xml file.

I'd still like to be able to run this stuff locally, this is important for testing and javascript should be no problem, it isn't in anything else I use unless for some reason this is an issue with flash.

Last edited by louiscar (2010-02-03 17:40:02)

Re: Examples (particularly API) Don't work

All the above tests are with Firefox. This is an issue for both browsers and I presume this would be the same with any other browser.

Yes external links may not work in Firefox also depending on your OS and security settings when running galleries locally. Online galleries should have no issues.

looks like the issue might be with the generation of Porta's version of gallery.xml
In it's version it uses the <name> tag which should be changed to <filename>

I was not aware of that. Thanks for the info.

Felix Turner
SimpleViewer Support Team.

Re: Examples (particularly API) Don't work

Felix wrote:

Yes external links may not work in Firefox also depending on your OS and security settings when running galleries locally. Online galleries should have no issues.

ok. I take it you are referring to 'external links' as being the api to flash calls? Any idea if the security issues can be overriden? I'm running XP pro with Firefox 3.0.6.

Louiscar wrote:

looks like the issue might be with the generation of Porta's version of gallery.xml
In it's version it uses the <name> tag which should be changed to <filename>

I was not aware of that. Thanks for the info.

Just to add to this I was using a Porta version .98 that dealt with sv 1.7.  A later version 1.00 states upgraded to 1.9 however, I can't tell you if this version changed the output of the xml tags, probably not as 1.9 didn't have issues with the <name> tag. I'm about to install v1.4 (still supporting 1.9), if you like I can report on the xml tag creation when I find out.

EDIT: It's also worth noting for any Porta users that swfobject.js has changed considerably hence the calling differences in post 3. Make sure you replace this with the distibution version. This may have been updated in the latest 1.4 Feb 2010 version.

Last edited by louiscar (2010-02-03 22:17:35)