Hey, ive found this tabswitch a while back. I use it to switch between 2 Videoplayers which can been viewed here http://www.anime-movie-site.com/Galaxy-Express-999 Problem is that its broken in IE, firefox is just fine but in ie 6/7 - it switch the tab, but the other movie dont stop playing, like it does in firefox. in ie8 once tab is clicked 1 player stands still and the other is always at the bottom of the browser window :/ if you scroll once clicked, you see it. I dont want to find something else, because i have the a href javascript codes often. Would be a pain to edit the movies again. I use this on the actual movies video #2 is display: none with css by default pageload. <ul class="movie_tabs"> <li><a href="javascript:tabSwitch('tab_1', 'vid_1');" id="tab_1" class="active">English Subtitles</a></li> <li><a href="javascript:tabSwitch('tab_2', 'vid_2');" id="tab_2">English Dubbed</a></li> </ul> movies codes in divs PHP: and the js file function tabSwitch(new_tab, new_content) { document.getElementById('vid_1').style.display = 'none'; document.getElementById('vid_2').style.display = 'none'; document.getElementById(new_content).style.display = 'block'; document.getElementById('tab_1').className = ''; document.getElementById('tab_2').className = ''; document.getElementById(new_tab).className = 'active'; } PHP: Does anyone know how to make this work in IE? possibly 6,7,8 Thanks, Seb
The movie won't stop playing because you only make it "invisible", so it will keep playing. if you'll change the value of vid_x to "" instead of changing its display to none it will stop.
Hmm this did not the trick. Firefox still was displaying fine, but in IE, once the second tab is clicked both player display and the first also dont stop playing Any more Ideas?
see if you can control playback externally - a lot of these flash players can interact with an external command. if so, append the command to the js that swaps tabs. view.sendEvent(ViewEvent.PLAY); i assume there's also .STOP - read your manual: http://developer.longtailvideo.com/trac/wiki/FlashApi failing that, reset the contents of the div on tab click