Flash and parameters

Page: 1

Author Post
McFly
Guest
Hi

I just implemented this great tool on my site. Very easy to seet up indeed!

The thing is. I need to specify the "base" parameter for my flash files. This is used to tell flash where to get additional data from.
Do I need to pass it along with the link somehow?

Kind regards
McFly
Administrator
Registered: Aug 2008
Posts: 3382
There is no capability in the current version to pass the 'base' parameter along when direct loading flash. I'll add it to the next version. It's just a couple of lines - you can patch this into the v3.24 js file if you like. Details below.

You can also get more control over flash parameters by setting your flash object up on a small standalone html page and loading that page in floatbox as an iframe. For an example of this, see the "Flash in a frame" sample on the demo page. "View source" on that would give you a good template to start with.

If you want to patch the js file, please let me know if it works out ok.

In the objectHTML function, find...
match = /\bscale=(\w+?)\b/i.exec(href),
scale = match ? match[1] : 'exactfit',
params = { wmode:wmode, bgcolor:bgcolor, scale:scale, quality:'high',

and insert the bolded stuff...
match = /\bscale=(\w+?)\b/i.exec(href),
scale = match ? match[1] : 'exactfit',
match = /\bbase=([^&]+)/i.exec(href),
base = match ? match[1] : '',

params = { wmode:wmode, bgcolor:bgcolor, scale:scale, base:base, quality:'high',


Cheers...
McFly
Guest
Hi admin

Thanks for the speedy reply!
Before using floatbox I used something called lightwindow. It did not open flash correctly and there was no support at all, so now I'm gonna use this great tool.

I must say it is very promising.

I tried your idea with the small HTML page while waiting for your reply, and it works fine.

You can see the final result here:
3D photos

In IE however there is a white flash in the background when the popup closes. Why is this?

/McFly
Administrator
Registered: Aug 2008
Posts: 3382
I've never noticed that brief flash (no put intended) in IE whenever flash content exits. It seems to do it for all floatboxed flash, including the samples on my demo page. I'll try to sort it out and fix it. Watch this space...
Administrator
Registered: Aug 2008
Posts: 3382
Found it. You can fix it by patching the v3.24 floatbox.js file (and framebox.js if you're using that) as follows:

In the end function (end: function(all)), find...
	var oncomplete = function() {
if (that.fbContent) {
that.fbMainDiv.removeChild(that.fbContent);
delete that.fbContent;
}
that.fbLoader.style.display = '';

And remove the entire if {...} block. Just delete it, leaving this...
	var oncomplete = function() {
that.fbLoader.style.display = '';

Explanation:
The purpose of that if block was to discard any flash that might be playing sound as floatbox animates down to zero on exit. Without that discard, the sound keeps playing until all the exit animation and overlay fade out completes, which is a little bit weird. However, it seems that when doing the discard with a flash object in place, IE, and only IE, decides to clear the browser screen to white and repaint the screen from scratch.

Page: 1