Topic: captions ONLY on rollover (continued)
Some time ago I posted a question about displaying captions only when rolling the mouse over the thumbnails, and I got great help by Mike who told me how to change the code in order to achieve that. It worked very well, but it only solved part of the problem.
In my the site, I want the navigation to be caption-free. But if you are interested on a certain picture, you only need to roll the mouse over the thumbnail in order to see the caption.
With the solution I got from Mike, the captions still appear when I navigate through the arrows on the main image, and I don't like that. I just want to see the captions when I roll the mouse over the thumbnails.
Even if I have no education or previous knowledge in AS nor flash, I have been all day trying to change some lines of code in order to achieve what I want. And I have to say that, surprisingly, I have come pretty close to what I want.
In Thumb.as I have deleted:
line 230 if (mSelected ) return;
(so that I can see the caption on mouse rollover, even if the thumbnail is selected)
line 239 if (mSelected ) return;
(so that the caption of the selected image disappears on mouseout)
In Imagearea.as I have deleted
line 204 mStageManager.showCaption(mCurrentImageIndex);
(so that when I press the navigation arrows of the main image, the captions do not appear)
The changes i Thumb.as worked perfectly, but the change in Imagearea.as had some kind of bug. When you navigate through the arrows on the main image (and no caption is supposed to appear), you get the last caption that has been displayed by a mouse rollover, and ALWAYS that same caption even if you press the arrows many times. If you mouseover another thumbnail, then it will be THAT caption that will be displayed when you use the navigation arrows again.
In order to try to come around that, I have done a change in line 145 of Image.as:
the original line: if (!Options.captionUnderThumbs) mStageManager.setCaptionVisible(true);
And my change has been to replace "true" by "false".
After this, the behavior I obtain is ALMOST what I want, but not quite. Now, no captions appear when I navigate with the arrows (good).
The problem appears when I navigate with the thumbnails. When I roll the mouse over a thumbnail, the caption displays as expected (good). But when I press the thumbnail in order to load the main image, the caption disappears (not good), and to display it again I have to rollout from the thumbnail and rollover again on it.
It is not maybe the end of the world, but I wonder if there is a way to keep the caption from disappearing when I press the thumbnail, and at the same time no captions appearing when I navigate with the arrows on the main image.
I have tried to make some changes in certain parts of the code, but since I do it quite blindly, i do not dare to change to many things.
Someone has a suggestion?
Thanks for your help!