These forums are provided for community interactions only. For official support please submit a support ticket.
You are not logged in.
Pages: 1
I just started using thumbgrid which is SO NICE! Finally freedom to move it around.
When I create a SS with a Gallery which is "Open at Startup", Id like to hide the thumbgrid, because it starts out empty. Then I'd like to to disappear again when you open the Gallery up again. I'm only now learning AS3. Im originally self taught on AS2, and there is quite a difference!
As a fallback, Id be OK with prepopulating the thumbnails with my first Gallery. But this is not my first choice.
Its not finalized (as of today), but here is my SS in action.
http://www.brandimageproductions.com/gallery.html
Another weird bug if you open the gallery then close it again, the thumbnails stay loaded in thumbgrid, which is fine. But if I click a thumbnail (Gallery still OPEN) the image appears in SSP, but the Gallery Stroke remains...
Offline
You could modify the visibility of ThumbGrid based on the galleryOpen and galleryClosed events.
http://wiki.slideshowpro.net/SSPfl/API- … alleryOpen
http://wiki.slideshowpro.net/SSPfl/API- … leryClosed
Offline
I would like to do this exact item but I am not very good with AS3 at the moment.
What would the exact code be please?
Offline
import net.slideshowpro.slideshowpro.*;
import net.slideshowpro.thumbgrid.*;
import flash.events.MouseEvent;
holder.visible = false;
thumbgrid.visible = false;
//holder.addEventListener(TGRequestEvent.LOAD_THUMB, onRequestEvent);
//nextGroup_button.addEventListener(MouseEvent.MOUSE_OVER, NextGroup);
//prevGroup_button.addEventListener(MouseEvent.CLICK, PreviousGroup);
holder.gallery_btn.addEventListener(MouseEvent.CLICK, Gallery);
//nextImage_button.addEventListener(MouseEvent.CLICK, NextImage);
//previousImage_button.addEventListener(MouseEvent.CLICK, PreviousImage);
my_ssp.addEventListener(SSPGalleryStateEvent.GALLERY_CLOSING, onGalleryStateEvent);
/*function NextGroup(event:MouseEvent) {
my_tg.nextThumbGroup();
}
function PreviousGroup(event:MouseEvent) {
my_tg.previousThumbGroup();
}*/
function Gallery(event:MouseEvent) {
holder.visible = false;
thumbgrid.visible = false;
my_ssp.toggleGallery();
}
/*function NextImage(event:MouseEvent) {
my_ssp.nextImage();
}
function PreviousImage(event:MouseEvent) {
my_ssp.previousImage();
}*/
function onGalleryStateEvent(event:SSPGalleryStateEvent) {
trace('yes');
holder.visible = true;
thumbgrid.visible = true;
}
function onRequestEvent(event:TGRequestEvent) {
holder.visible = false;
thumbgrid.visible = false;
}
I altered the code from this thread:
http://forums.damppants.com/viewtopic.php?id=15558
Property names:
"holder" is the gallery button name
"thumbgrid" is the thumbgrid name
Thumbgrid needs to be on the top layer.
The gallery button can be in a movieclip, but you need to make sure to change the "holder" lines to
yournewclipname.holder.visible = bla bla;
Last edited by crittle1 (2009-03-24 08:55:28)
Offline
Hi guys, I have tried to do "How do you make Thumbgrid dissapear when SSP Gallery is Open?" with my Gallery and thumgrid...but I'm doing something wrong and its not working.
Is it possible someone could show me how it's done with my fla. Much appreciated. And i can learn from what has been done. Yes I'm a newbie.
Paul
ikin.paul@gmail.com
Offline
hello,
thanks for a great script! just a small fix for those who have had trouble:
change the line that says
holder.gallery_btn.addEventListener(MouseEvent.CLICK, Gallery);
to
holder.addEventListener(MouseEvent.CLICK, Gallery);
then it should work perfectly.
Offline
Having Thumbgrid disappear when the gallery is open is exactly what I want. (It makes no sense to me that it should be showing thumbs from the last opened album.) Hopefully this option will be *built into* the next versions of TG and SSP.
I have NO ActionScript experience and when I look at the links and solutions listed in this thread I might as well be reading Greek. Help, please!
What I tried:
Opened the Actions window. Put the focus on the stage rather than the SSP or TG component. Copied and pasted the code listed by crittle1 into the empty Actions - Frame, and made the modification listed by ptlx.
What happend:
When publishing the slideshow there are 9 compile errors all of which are one of the following.
* 1120: Access of undefined property holder.
* 1120: Access of undefined property thumbgrid.
Where & how do I define these? And what should they be?
TIA!
Offline
Here is the exact compiler error log:
**Error** Scene 1, Layer 'Layer 1', Frame 1, Line 32: 1120: Access of undefined property holder.
holder.visible = false;
**Error** Scene 1, Layer 'Layer 1', Frame 1, Line 34: 1120: Access of undefined property thumbgrid.
thumbgrid.visible = false;
**Error** Scene 1, Layer 'Layer 1', Frame 1, Line 48: 1120: Access of undefined property holder.
holder.visible = true;
**Error** Scene 1, Layer 'Layer 1', Frame 1, Line 49: 1120: Access of undefined property thumbgrid.
thumbgrid.visible = true;
**Error** Scene 1, Layer 'Layer 1', Frame 1, Line 53: 1120: Access of undefined property holder.
holder.visible = false;
**Error** Scene 1, Layer 'Layer 1', Frame 1, Line 54: 1120: Access of undefined property thumbgrid.
thumbgrid.visible = false;
**Error** Scene 1, Layer 'Layer 1', Frame 1, Line 5: 1120: Access of undefined property holder.
holder.visible = false;
**Error** Scene 1, Layer 'Layer 1', Frame 1, Line 6: 1120: Access of undefined property thumbgrid.
thumbgrid.visible = false;
**Error** Scene 1, Layer 'Layer 1', Frame 1, Line 15: 1120: Access of undefined property holder.
holder.addEventListener(MouseEvent.CLICK,Gallery);
Total ActionScript Errors: 9, Reported Errors: 9
Offline
Can anyone help, I was soo close I copied the scrip and changed the variables as instructed but I get 2 issues - first when I publish the swf is black - nothing is shown and second I get this error
1046: Type was not found or was not a compile-time constant: TGRequestEvent.
No I played around and at one stage was able to get the gallery & album visible but every time I click my mouse on a thumb it would take me back to the gallery view. So after playing around I started again, and thats where I am now. When I publish I get a white square with no content and the error above.
Heres my script if it helps:m I should also say Im very new to this - this is my first time trying to alter any type of script so I have probably screwed it up myself - but any help is so greatly appreciated
import net.slideshowpro.slideshowpro.*;
import net.slideshowpro.grid.*;
import flash.events.MouseEvent;
my_ssp.visible = false;
grid.visible = false;
//my_ssp.addEventListener(TGRequestEvent.LOAD_THUMB, onRequestEvent);
//nextGroup_button.addEventListener(MouseEvent.MOUSE_OVER, NextGroup);
//prevGroup_button.addEventListener(MouseEvent.CLICK, PreviousGroup);
my_ssp..addEventListener(MouseEvent.CLICK, Gallery);
//nextImage_button.addEventListener(MouseEvent.CLICK, NextImage);
//previousImage_button.addEventListener(MouseEvent.CLICK, PreviousImage);
my_ssp.addEventListener(SSPGalleryStateEvent.GALLERY_CLOSING, onGalleryStateEvent);
/*function NextGroup(event:MouseEvent) {
my_tg.nextThumbGroup();
}
function PreviousGroup(event:MouseEvent) {
my_tg.previousThumbGroup();
}*/
function Gallery(event:MouseEvent) {
my_ssp.visible = false;
grid.visible = false;
my_ssp.toggleGallery();
}
/*function NextImage(event:MouseEvent) {
my_ssp.nextImage();
}
function PreviousImage(event:MouseEvent) {
my_ssp.previousImage();
}*/
function onGalleryStateEvent(event:SSPGalleryStateEvent) {
trace('yes');
my_ssp.visible = true;
grid.visible = true;
}
function onRequestEvent(event:TGRequestEvent) {
my_ssp.visible = false;
grid.visible = false;
}
Offline
Thanks for posting this, it was quite helpful.
Offline
There's probably some downside to my method, but I eventually got it to function right, using this...
import net.slideshowpro.slideshowpro.*;
function onGalleryStateEvent(event:SSPGalleryStateEvent):void { my_tg.visible = true; }
my_ssp.addEventListener(SSPGalleryStateEvent.GALLERY_CLOSED, onGalleryStateEvent);
my_ssp.addEventListener(SSPGalleryStateEvent.GALLERY_CLOSING, onGalleryStateEvent);
my_ssp.addEventListener(SSPGalleryStateEvent.GALLERY_HIDDEN, onGalleryStateEvent);
function onGalleryStateEvent2(event:SSPGalleryStateEvent):void { my_tg.visible = false; }
my_ssp.addEventListener(SSPGalleryStateEvent.GALLERY_OPEN, onGalleryStateEvent2);
my_ssp.addEventListener(SSPGalleryStateEvent.GALLERY_OPENING, onGalleryStateEvent2);
Offline
You can also combine it all into a single function, for simplicity, using this:
import net.slideshowpro.slideshowpro.*;
function onGalleryStateEvent(event:SSPGalleryStateEvent) {
if (event.type == "galleryOpening") {
my_tg.visible = false;
} else if (event.type == "galleryClosing") {
my_tg.visible = true;
}
}
my_ssp.addEventListener(SSPGalleryStateEvent.GALLERY_OPENING, onGalleryStateEvent);
my_ssp.addEventListener(SSPGalleryStateEvent.GALLERY_CLOSING, onGalleryStateEvent);Offline
FYI, when you get those errors that say "* 1120: Access of undefined property", that simply means that you have something in your code that's referencing an object that's not there or isn't named. For example, in the code I posted, I refer to my_ssp and my_tg, which are what I named SSP and TG, but if I had forgotten to actually name the components that, or if they weren't on the stage at all, it would be throwing that error. You have to name each component before ActionScript can affect it--that's at the top of the Properties panel that appears when you click on the component.
Offline
Not sure if this is the right area to post this question. I am attempting to layer the thumbgrid over a ssp instance. It's normal state will be invisible. I can add a button to make it invisible but would like to make it dissapear when you click on a thumb item. Is there a way to do this. Thanks!
Offline
Pages: 1