Topic: Saturation

Hello,

I would create a Photogallery and I've seen that with Autoviewer is possible to manipulate the Brightness of the non-current images.

Is it also possible to manipulate the Saturation of those pictures (for example fading from black and white to color)?

Thank you
Cico

Re: Saturation

There is no preconfigured option to change the saturation of unselected images.
However, AutoViewer-Pro comes with source code so with Adobe Flash Professional and a knowledge of Actionscript, it is possible to display unselected images as grayscale by modifying the 'Image.as' file.
Open the 'Image.as' file in a plain text editor and make the following changes.
Add the following line of code to the imports at the top of the file.

import flash.filters.ColorMatrixFilter;

... add the following code to the end on the hide() function:

var matrix:Array = [0.3, 0.59, 0.11, 0, 0, 0.3, 0.59, 0.11, 0, 0, 0.3, 0.59, 0.11, 0, 0, 0, 0, 0, 1, 0];
var grayscaleFilter:ColorMatrixFilter = new ColorMatrixFilter(matrix);
mcLoader.filters = [grayscaleFilter];

... and add the following code to the end on the show() function:

mcLoader.filters = [null];

Now publish a new SWF file as documented here.
Please note that the transition between grayscale and color in the example above is instant. There is no fading between the two. This would require further modification of the source code.

Steven Speirs
SimpleViewer Support Team.

Re: Saturation

Thank you Steven Speirs.
Finally I used Tweenmax and I could create the effect I wanted and the fade effect also...

I've published the swf as you said and imported the new autoviewer.swf file on my WP site (I'm using Nextgen Flashviewer for embedding the galleries) but I still have a problem: my gallery stops on the "Loading autoviewer" message...

Any advice?

Thank you again
Cico

Re: Saturation

To see if your modifications have any effect on this problem, try swapping your new SWF file in your gallery with the stock SWF file from the AutoViewer-Pro download zip package.
If your gallery still does not display, then check the supporting files in your gallery (the XML file and the images themselves).
If your gallery does display, then the problem lies with your new SWF file, in which case, check that your SWF file published with no errors.
If there are publishing errors, go through them and fix them one at a time.
If there are no publishing errors, I would advise starting from the beginning and modify the source code one bit at a time (rather than plug in all the code and only publish at the end), publishing and checking the SWF file (in a gallery known to work) after each modification.

Steven Speirs
SimpleViewer Support Team.

Re: Saturation

Hello,

I still have the same problem with my galleries... I've tried to modify the XMLPath and the Image path but Flash give me the error "Error loading XML doc".

Nextgen Flashviewer has a .php file and not .xml, I've tried to put the address of the php file or the url of my .swf file in the XMLPath string but is not working (also the stock SWF file gives me the same problem).

Somebody knows the right path where I can find the xml or need to do something else?

Thank you

Re: Saturation

Nextgen Flashviewer has a .php file and not .xml, I've tried to put the address of the php file or the url of my .swf file in the XMLPath string but is not working

AutoViewer-Pro uses the xmlURL configuration option (not XMLPath) to define the path to the XML file.
Please see here for details.

Using the path to the PHP file which dynamically generates the XML data as your xmlURL configuration option should work fine.
If you continue to experience difficulties, please post the URL to your web page so that I can take a look and help further.

Steven Speirs
SimpleViewer Support Team.

Re: Saturation

Sorry but I think there is something wrong with the passages I've made, now if I put the .php address I get this message in Flash:

No images specified in XML doc

The URL where I'm trying to put the gallery is this one:

francescoravetto.com/pictures/trip/india

Thanks

Re: Saturation

I know you have already said "the stock SWF file gives me the same problem" but it looks like there may be a problem with the SWF file on your web server which, currently, is a modified version.
Temporarily swap your own modified version with the stock version (from the AutoViewer-Pro download zip package) and clear your browser's cache before reloading your gallery.
If your gallery displays OK (your paths look OK) then try republishing and reuploading your SWF file (and make sure that there are no publishing errors).

Steven Speirs
SimpleViewer Support Team.