Take the 2-minute tour ×

I'm using this plugin http://www.artviper.net/website-tools/bumpbox-lightbox.php to display flash files. I need to change width and height of the window to 100% instead of pixels. I uploaded the script here: http://www.bodom.eu/bumpbox/bumpbox-2.1.js

I use this link to display flash from my html file: <a href="01_ka01.swf" class="bump" rel="800-600"></a>

When no rel is defined, script use the default value 640x480 from bumpbox-2.1.js (exactly it is maxw = 640; and maxh = 480; - at line 121).

So, I need to change that rel to percentage value, or that default value in the .js file. I've tried add width="100%" height="100%" to that anchor, but it didn't work. I've also tried change maxw=640; to maxw='100%'; but with no effect.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

w = window.getSize().x.toInt(); h = window.getSize().y.toInt();

that means you know the dimensions of the window.

maxw = w; maxh = h;

should do the trick.

share|improve this answer
artViper, you're the developer of bumpbox? It's really awesome script! I tried your tip and it perfectly worked, but I realize, that I cannot see the off button:( Is it possible to set it for example to 90%? Thank you very much! –  culter Aug 2 '11 at 19:44
OK, I solved it with maxw = w - 70; Thank you! –  culter Aug 2 '11 at 20:15
add comment

yes, we're the developers of this script. Glad it works out for you now ;)

share|improve this answer
I think that Bumpbox is best of lightbox clones, artViper, really great job! Could you, please, check this question? stackoverflow.com/questions/6927350/… –  culter Aug 3 '11 at 15:44
add comment

Your Answer


