You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

How to pause/unload swf in jQuery Tools Tabs Created Dec 21, 2009

This thread is solved

Views: 5175     Replies: 10     Last reply Jun 21, 2011  
You must login first before you can use this feature

Kristian Thranee

Posts: 4

Registered:
Jun 8, 2009

How to pause/unload swf in jQuery Tools Tabs

Posted: Dec 21, 2009

Hey,

In the process of using Flowplayer and jQuery Tools on the new yousee.dk site, i have run into a problem regarding swf's in a jQuery Tools Tabs setup.

The Tabs controls 5 div's with various content, such as images, flowplayer instances and ordinary swf's inserted via FlashEmbed.

When the Tab is set as active (via display), the swf is loading just fine. And when the Tab is again inactive, the swf stops just fine.

BUT not in IE ...

So, my question is, if anyone knows how to pause/unload the swf when display = none in IE?

Best regards,
Kristian Thrane - Frontend Developer @ yousee.dk

brihan

Posts: 9

Registered:
May 28, 2009

» How to pause/unload swf in jQuery Tools Tabs

Posted: Feb 8, 2010

Reply to: How to pause/unload swf in jQuery Tools Tabs, from yousee
I habve bumped into this problem too. Kristian, did you solve this?

aldrichdesigner

Posts: 6

Registered:
Mar 15, 2010

» » How to pause/unload swf in jQuery Tools Tabs

Posted: Mar 15, 2010

Reply to: » How to pause/unload swf in jQuery Tools Tabs, from brihan
I'm looking for a solution to this as well

aldrichdesigner

Posts: 6

Registered:
Mar 15, 2010

» » How to pause/unload swf in jQuery Tools Tabs

Posted: Mar 15, 2010

Reply to: » How to pause/unload swf in jQuery Tools Tabs, from brihan
Okay so there appears to be a problem with the way display:none; is being applied in IE. I tried to set display:none; on my tabs that are loaded in before they display and while this works for the initial load it no longer works once you start clicking thru the tabs. I see that we can set current class, how bout a not current class and we could assign display:none; to that field. That could possibly fix this issue?

I'm sure there is a way to do this as is now but my javascript isn't awesome.

aldrichdesigner

Posts: 6

Registered:
Mar 15, 2010

Jquery UI knows how

Posted: Mar 16, 2010

Reply to: » How to pause/unload swf in jQuery Tools Tabs, from brihan
Well just when I thought I was getting somewhere with this, I still got nothing. I tried doing a toggle class on the div with the flash content to maybe for the display:none; but that didn't do me any good. I'm desperate for a solution to this problem.

Jquery UI is able to accomplish this though, I don't like it as much as jquery tools and you can't "page" thru the tabs. But whatever they are doing with switching between tabs seems to be working across all browsers regardless of flash content.

brihan

Posts: 9

Registered:
May 28, 2009

» Jquery UI knows how

Posted: May 19, 2010

Reply to: Jquery UI knows how, from aldrichdesigner
bump.

I'd like to know how to solve this problem too.

blissofbeing

Posts: 2

Registered:
Aug 6, 2010

This Worked for us

Posted: Aug 15, 2010

Reply to: How to pause/unload swf in jQuery Tools Tabs, from yousee
JS

$(function() {
	var api = $(".items").tabs(".tabs-cont").data("tabs");
	
	api.onClick(function(index) {
		var video = api.getCurrentPane().find("div.video"),
		videoCont = video.find("div.video-cont");
		videoCont.detach();
		video.append(videoCont);
	});
});

HTML

<div class='video'><div class="video-cont"><object>FLASH EMED HERE</object></div></div>

pixnflix

Posts: 5

Registered:
Jan 7, 2011

jQuery UI tabs

Posted: Jan 7, 2011

Reply to: This Worked for us, from blissofbeing
Would this also work using jquery ui tabs?

pixnflix

Posts: 5

Registered:
Jan 7, 2011

» jQuery UI tabs

Posted: Feb 17, 2011

Reply to: jQuery UI tabs, from pixnflix
I was able to make it work. Also the solution on top does not work for jQuery Tools Tabs. It creates an error when you want to go back to a previously closed tab and try to play media. You also need the cookie plugin for this to work.


$( "#tabs" ).tabs({,
		
	show: function(e, ui) {
		$.cookie( "tab-name", ui.panel.id );
	},

	select: function (e, ui) {
		var tab = "#" + $.cookie ( "tab-name");
		var video = $( tab ).find("div.media-container");
		var flow = video.find("div.flow-container").attr('id');
		$f(flow).stop();
	}
});