Topic: simpleviewer and ZINC v3

Hi,

I am wondering if it is possible to use SimpleViewer with Zinc at all. I am experieneing some PATH issues, where by the EXE file that is created by ZINC does not know WHERE in a computers file/folder hirarchy it is run from without prefixing paths with a mdm.Application.path to insert the absolute path to the EXE file.

This measn that the simpleviewer works when loaded into the SWF and if it is run as SWF, but once I use that SWF to build an EXE from in ZINC it stops running.

Can you please tell me where to amend the path with the 'mdm.Application.path ' to make this work please? Also, would I need to amend any paths in the respective XML files (e.g. gallery.xml)?

Thanks,
Nik C

Re: simpleviewer and ZINC v3

Can you please tell me where to amend the path with the 'mdm.Application.path ' to make this work please?

I am not familiar with ZINC. Have you tried the ZINC support pages?
Perhaps other ZINC users reading this can help further.

Also, would I need to amend any paths in the respective XML files (e.g. gallery.xml)?

The imageURL, thumbURL and linkURL paths within the gallery's XML file can be either relative (to the HTML document containing the embedding code) or absolute.

Steven Speirs
SimpleViewer Support Team.

Re: simpleviewer and ZINC v3

Thanks Steven for you reply.

I got the simpleviewer to work as far as it now loading the viewer into the swf that has been turned into an exe file using zinc.
But it does not display the gallery images (thumbs and images) and only CROSSES in place of the images.

Is the path that is used to load the actual images into the viewer constructed inside the viewer.swf or is there a way to make it receive the complete path (or a PREFIX to it) from OUTSIDE the viewer.swf? As in a property of the viewer instance in Flash (e.g. [viwerInstanceName].imagePath or something similar)?

Thank you for your time!

Kind Regards,
Nik C

Re: simpleviewer and ZINC v3

The paths to the images are set via the imageURL attributes to the <image> tags in the gallery's XML file, eg:

<image imageURL="images/image.jpg" thumbURL="thumbs/thumb.jpg" linkURL="" linkTarget="" >

... or:

<image imageURL="http://www.example.com/gallery/images/image.jpg" thumbURL="thumbs/thumb.jpg" linkURL="" linkTarget="" >

I do not have access to the source code so I do not know how the paths are manipulated internally by the SWF file but I suspect that if the paths are absolute (ie. they start with 'http://' or 'file:///'), then no further action will be taken and they will be used just as they appear in the XML file.

Steven Speirs
SimpleViewer Support Team.

Re: simpleviewer and ZINC v3

Hi Stephen,

Thanks for your reply.

The thing I dont understand is that if - during testing - i purposely mess up the path on this line in the FLASH code:

_root.xmlDataPath = "data\\gallery"+galleryId + ".xml";

then the finished exe file (after ZINC) - or the viwer.swf loaded into it - displays the GALLERY NOT FOUND error.

If I change that file to:

_root.xmlDataPath = mdm.Application.path + "data\\gallery"+galleryId + ".xml";

then the viewer.swf / .exe file seems to find the gallery XML but not the images (displaying crosses)

Hmm,....

Nik C

Re: simpleviewer and ZINC v3

xmlDataPath is a variable from SimpleViewer v1.x and is not used in SimpleViewer v2.x.
Use instead galleryURL as described here: http://simpleviewer.net/simpleviewer/pr … .html#html

viewer.swf

Or are you using SimpleViewer v1.x (SimpleViewer v2.x's SWF file is named 'simpleviewer.swf')?
If using SimpleViewer v1.x, then the paths to the images within the XML file are not specified via imageURL attributes of the <image> tags.
Instead, the first fragment of the image's URL comes from the imagePath attribute of the opening <simpleviewergallery> tag and the second fragment comes from the contents of the <filename> tag for each image entry.
eg.

<simpleviewergallery imagePath="images/">
<image>
    <filename>image.jpg</filename>
    <caption></caption>    
</image>
</simpleviewergallery>

Please note that other essential options have been removed from the above sample code for clarity.
Try using an absolute path for the imagePath attribute in your gallery's XML file.

Steven Speirs
SimpleViewer Support Team.

Re: simpleviewer and ZINC v3

Hi Stephen, from your description I am using SimpleViewer v1.x
I think I purchased this about 2-3 years ago, so it is quite a while. Is there an update path and possibly would solve the issue I am having with the gallery?
Thanks,
Nik

Re: simpleviewer and ZINC v3

Try my suggestion above first. It might work.

Is there an update path

Upgrades are free within the same major version number so you would only be able to download the latest SimpleViewer v1.x release.
However, customers who purchased SimpleViewer-Pro v1.9 on or after 9th December 2008 are eligible for a free courtesy upgrade to v2.0.
If this applies to you, then please fill out this form to receive a new link: http://www.simpleviewer.net/support/admin/upgrade.html
For full details on 'Upgrading SimpleViewer-Pro', please see here for details: http://simpleviewer.net/simpleviewer/pr … grade.html

and possibly would solve the issue I am having with the gallery?

I would not like to speculate. However, you could try with SimpleViewer-Standard v2.1.3 (which supports the galleryURL option and the new format XML file with imageURLs to which I referred above).
SimpleViewer-Standard can be downloaded from the 'Download' button link on this page: http://simpleviewer.net/simpleviewer/

Steven Speirs
SimpleViewer Support Team.

Re: simpleviewer and ZINC v3

hi again,

Is there any way of integrating the latest version of simpleviewer into FLASH directly?I could use this code to load the viewer into a movie clip in flash:


First I create / set its various parameters and variables with this:

_global.SVStageWidth = 850;
_global.SVStageHeight = 500;

var galleryId:Number;
var mLoader_mcl = new MovieClipLoader();
mLoader_mcl.addListener(this);

then load the viewer with this code:

loadGallery(1);

function loadGallery(galId){
    galleryId = galId
    mLoader_mcl.loadClip(mdm.Application.path + "data\\simpleviewer.swf",mcLoader);
}
function onLoadInit(){
    _root.xmlDataPath = "data/gallery"+galleryId + ".xml";
    com.airtightinteractive.apps.viewers.simpleViewer.Options.imageFrameColor = 0xcccccc; 
}

Is there a reference page in the forum, or a knowledge database where anything like this has been documented?

Actually - I have jsut found this page: http://simpleviewer.net/simpleviewer/pr … html#flash

BUT this requires the flash movie to be AS3 and there is no-way I can rewrite mine in AS3 in the time it needs to be finished. Is there a similr page for AS2 (and simpleviewer v1x if possible) ??????



Thanks!

Nik C

Last edited by nik_c (2011-10-19 09:37:49)

Re: simpleviewer and ZINC v3

Is there a similr page for AS2

No. Embedding SimpleViewer-Pro in Flash requires the embedding movie to be ActionScript 3.

(and simpleviewer v1x if possible) ??????

The Embedding SimpleViewer-Pro in a Flash Movie page for SimpleViewer v1.9 can be found here: http://simpleviewer.net/simpleviewer/pr … flashembed

Steven Speirs
SimpleViewer Support Team.

Re: simpleviewer and ZINC v3

Thanks Steven for your reply. I 'll have a look at the source files and see if I can modify them to make it all work.