Topic: Slide images and hide thumbnail area. PLEASE HELP!

Hello!

I'm using v1.8 and trying desperately to customize two things:

1. I want the images to switch automatically - meaning: slide. I added the following code on a few spots in ImageArea.as but nothing happens:

setInterval(function() {
        loadNextImage();
    }, 3000);

Please help me. I know there's the AutoViewer but I want SimpleViewer to slide images automatically and it doesn't seem too hard to do it... just need to know how to do it...  wink

2. I want to have an option to hide the whole ThumbArea. How can I do it? I mean - just hide the whole ThumbArea and only the big image would show on the screen streching to the whole stage.

Would appreciate your help!
Thanks.

Re: Slide images and hide thumbnail area. PLEASE HELP!

I'm afraid you are trying to make a cat into a dog.
If you need just a slide show with no thumbs - You can do this in flash, with out SV.

Richard

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: Slide images and hide thumbnail area. PLEASE HELP!

You're right... but the problem is that I want to use this gallery on a few different places so I don't wanna erase the thumbnail part or the non-slideshow option, I want it to BE options, so in some places I'll use it as it is - non-slideshow and thumbnail display as normal and in another place I'll upload it as a slideshow. I'm just looking for the right code to compile in each kind of use.

Thanks in advance.

Re: Slide images and hide thumbnail area. PLEASE HELP!

1. I want the images to switch automatically

To step to the next image every 3 seconds, add this code into the ImageArea.init() function

setInterval(Delegate.create(this,onClickNext), 3000);

2. I want to have an option to hide the whole ThumbArea.

To disable thumbnails completely, set thumbnailColumns or thumbnailRows to 0.

Felix Turner
SimpleViewer Support Team.

Re: Slide images and hide thumbnail area. PLEASE HELP!

THANK YOU SOOO MUCH!!!
Completely solved my problem!

Re: Slide images and hide thumbnail area. PLEASE HELP!

Sorry YGV2000
Turns out you can make a fine dog and easily too.
Richard

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: Slide images and hide thumbnail area. PLEASE HELP!

Hey!

After making those changes (which worked perfectly! TNX) I noticed that the caption would not load if ThumbArea is hidden (and it is if I set mThumbRow). I tried positioning it all in the StageManager but nothing...

How do I make the captions work always and how do I position them in the bottom right corner of the image (portrait or landscape dependable).

Thanks for every tip of help!
YGV2000

Re: Slide images and hide thumbnail area. PLEASE HELP!

Hi Felix,

I've successfully make slideshows with the Simpleviewer with your method.
Do you know how to make the slideshow loop by itself?

Thanks a lot

Anna

Re: Slide images and hide thumbnail area. PLEASE HELP!

Do you neccessarily need the pro version of simpleviewer to make a slideshow option work? What file can you find the ImageArea.init() function in?

Re: Slide images and hide thumbnail area. PLEASE HELP!

Yes, you need the pro version of simpleviewer to hack all the auctionScript code. For compile it you need Macromedia Flash MX 2004 v7.2(4.0.0.32). With previous versions doesn't work and the flash compiler return errors.

mod by tigerstare
Here is some very basic logic that implements a slideshow in SV Pro 1.8. I've kept my example simple -- no new buttons or controls are used -- by modifying a fairly standard install of SV. Hopefully it's easy enough to get you started and not so simple to be of no use.

You'll start by modifying the ImageArea.as file. We want the init() function. Right after this line of code (~ line 107)

col.setRGB(mXMLManager.imageFrameColor);

and before the function's closing brace ( } ) you want to insert this line of code

mIntervalId = setInterval( Delegate.create( this, onClickNext ), mSlideShowDuration );

This guy does the work. It's a timer that calls onClickNext, but it depends on variables we've not yet set. So let's set 'em...

The beginning of the ImageArea class is where all our variables are defined. (Well, it's where you ought to define them if you enjoy tidy code.) Look for a suitable blank spot, say line 47 or so, and insert 2 lines

private var mSlideShowDuration:Number = 3000;
public var mIntervalId:Number;

Now we have a public reference to our timer, mIntervalId, and we have a private reference to the duration between calls, mSlideShowDuration. (The duration is in milliseconds.) You'll notice all the other variables here are private. We're making mIntervalId public in order to be able to call it from  outside of the ImageArea class.

The slideshow would work now. It would start as soon as your first image displayed and continue until the final image was shown. But we need a way to disable it. I've chosen to disable the show as soon as any thumbnail is clicked.

To do this, we need to edit the Thumb.as file and look for private function onRelease(). (You might find the function declared around line 212.) On the last line of the function (before the closing brace) insert this code

clearInterval( mImageArea.mIntervalId );

to stop the slideshow. Now when a thumbnail is selected (a click, a dragout, etc) the reference to our timer is cleared and the slideshow stops.

But this modify made by tigerstare have a problem, the slide show stop at last image of gallery... Do you know a way to make a loop of the slide? Any solution for this?

Re: Slide images and hide thumbnail area. PLEASE HELP!

There's always a solution. 8)

Mine is here:
http://www.airtightinteractive.com/foru … php?t=1674