These forums are provided for community interactions only. For official support please submit a support ticket.

You are not logged in.

#1 2009-02-13 15:09:56

elevationexhibits
New Member
Registered: 2007-06-14
Posts: 3

How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

#2 2009-02-14 10:56:15

afrmx
Support super
From: Mexico City, Mexico
Registered: 2007-07-23
Posts: 6483
Website

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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


Antonio Farias
antonio[at]slideshowpro.net

(Tambien doy soporte en espaņol, solo pregunta.)

Offline

 

#3 2009-02-20 21:10:37

ericc@mac.com
New Member
Registered: 2006-03-15
Posts: 8

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

#4 2009-03-24 08:52:49

crittle1
Member
From: Soddy Daisy, TN
Registered: 2007-10-20
Posts: 59
Website

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

#5 2009-06-18 16:11:14

kashan
New Member
Registered: 2008-06-11
Posts: 6

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

#6 2009-06-23 18:26:19

ptlx
New Member
Registered: 2007-09-28
Posts: 14

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

hello,

thanks for a great script! just a small fix for those who have had trouble:

change the line that says

Code:

holder.gallery_btn.addEventListener(MouseEvent.CLICK, Gallery);

to

Code:

holder.addEventListener(MouseEvent.CLICK, Gallery);

then it should work perfectly.

Offline

 

#7 2009-08-19 19:58:58

lllusion
Member
Registered: 2008-03-16
Posts: 57

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

#8 2009-08-21 19:59:21

lllusion
Member
Registered: 2008-03-16
Posts: 57

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

#9 2009-09-07 07:43:10

jeremy_warnock
New Member
Registered: 2008-12-11
Posts: 2

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

#10 2010-07-07 17:18:11

unleashed
New Member
Registered: 2006-10-16
Posts: 3

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

Thanks for posting this, it was quite helpful.

Offline

 

#11 2010-07-21 05:27:14

jpleas
New Member
Registered: 2009-04-17
Posts: 1

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

#12 2010-07-21 19:15:56

adaml1313
Veteran Member
Registered: 2006-04-07
Posts: 120

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

You can also combine it all into a single function, for simplicity, using this:

Code:

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

 

#13 2010-07-21 19:23:01

adaml1313
Veteran Member
Registered: 2006-04-07
Posts: 120

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

#14 2012-03-20 15:14:34

bossman
Member
Registered: 2008-06-24
Posts: 53

Re: How do you make Thumbgrid dissapear when SSP Gallery is Open?

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

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson