View Full Version : flash slideshow w/sound - tab content

02-04-2008, 08:33 PM
Tab Content Script (v 2.0)

I have a flash slideshow w/sound as the content of on of my tabs. When I click it the slideshow plays just fine, but when I click a different tab to load other content the sound from my slideshow continues to play but only in IE (of course).
Any ideas on how to fix this?

02-05-2008, 08:00 AM
This is normal, as the script is merely toggling the visibility of the content divs. If your Flash slideshow can be played/stopped via JavaScript, one way is to attach an onClick event to the LI of each tab to control the slideshow, something like:

<ul id="flowertabs" class="shadetabs">
<li onClick="flashslide.pause()"><a href="#" rel="tcontent1" class="selected">Tab 1</a></li>
<li onClick="flashslide.pause()"><a href="#" rel="tcontent2">Tab 2</a></li>
<li onClick="flashslide.play()"><a href="#" rel="tcontent3">Tab 3</a></li>
<li onClick="flashslide.pause()"><a href="#" rel="tcontent4">Tab 4</a></li>
<li onClick="flashslide.pause()"><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>

Here I'm assuming Tab 3 is the one whose content carries the slideshow.

Or, another solution is to use Ajax Tabs Content script (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm), and for the tab that will show the Flash slideshow, use the IFRAME mode so it's shown in an IFRAME. The script will remove this IFRAME when a different tab is selected.

02-08-2008, 03:54 AM

Thanks for your quick reply! First off, the flash slideshow can't be played/stopped via JavaScript. I have been trying to redo my page in the Ajax Tabs Content script like you said but I can't get it to work. I am very new at coding and so it's easy for me to miss something obvious. If you have the time could you help me figure out the best route for what I need to accomplish?

I have a page with several tabs that link to flash panoramas and one that goes to a flash slideshow. I was using Tab Content Script (v 2.0) but, as you know, the sound for the slideshow keeps playing in IE. Here is a link to that page http://revolutionaryviews.com/test/tabtest.html

Can you look at it and tell me, in your opinion, what would be the best route for me to take in order to dynamically show the different content.
Can I use Tab Content Script with the Ajax Tabs Content Script?

By the way, here is what I get when I use the Ajax Tabs Content Script.
I'm a bit tired so I'm sure I'm missing something very obvious but I just can't figure it out. Plus I'm not sure this is the route I need to take.

Without judgement of my lame coding can you help me figure this out?
I'd be very grateful!

Thanks in advance.

02-08-2008, 04:17 PM
Looks OK in IE but I see a double header in Safari and in Firefox. Why?

02-09-2008, 06:28 AM
Hmm at a glance I don't actually see why it's behaving that way in Firefox. I suspect it's something with either your HTML (ie: some missing or invalid tag), or that all but one of the tabs contain an actual reference to a external HTML page (ie: kb_slideshow.html). To verify this, try creating a blank page with just Ajax Tabs Content script, and make sure each tab references an external page that exists, and see if that changes anything.

02-09-2008, 01:48 PM
I haven't added any of the links except the slideshow (kb_slideshow.html) so that's why the others don't show up. All my tags are correct I've checked them a dozen times. The double screen problem in Firefox and Safari only happened after I placed the div content name (countrydivcontent) into the script. I don't know if that's a clue or not, but when I change the div content name in the script the double screen goes away.


02-09-2008, 03:21 PM
I think I have it now. If the tabs are not all linked to content it doesn't work. I completed the links, all as iframes, and now it works.

Next step... figure out why the tabs act different in every browser and why the scroll bars show up in IE on some of the iframes. Back to work...

Thanks ddadmin for all your help.

02-09-2008, 07:26 PM
Well, the scrollbars appearing in the IFRAME is normal when the browser cannot accommodate entirely the content height wise. You can explicitly disable the scrollbars by editing the below line in the .js file:

this.defaultIframe='<iframe src="about:blank" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" scrolling="no" class="tabcontentiframe" style="width:100%; height:auto; min-height: 100px"></iframe>'

The code in red is new.