« [YTB] I Will Possess your heart | Home | Trapped »
flashLightBoxInjector 1.2 and Lightbox 2.0.4
It has been brought to my attention that the release of Lightbox 2.0.4 broke some stuff in flashLightBoxInjector 1.2. After investigating the issue, it turns out that one (1) tiny change to the lightbox.js file is needed in order to get flashLightBoxInjector working with Lightbox 2.0.4.
In Lightbox 2.0.4 Lokesh (the author of Lightbox) decided to create the Lightbox instance without storing it into a variable. As flashLightBoxInjector relies on that variable, things broke. Now, to fix this follow this tiny procedure and it'll work just fine, as it did with version 2.0.3:
- Open
lightbox.jswith your favorite texteditor - Scroll down to the very last line where it reads
JavaScript:
-
document.observe('dom:loaded', function () { new Lightbox(); });
-
- Replace that line with this
JavaScript:
-
document.observe('dom:loaded', function () { myLightbox = new Lightbox(); });
-
- Save your file and ... that's it
I've changed the online example and flashLightBoxInjector 1.2 download and demos here on bram.us to include that change, so you can roll with it “out of the box”. Above that I've mailed Lokesh about this issue, hoping to see the variable reappear in a next release.
About this entry

Apr 15 2008 / 8:51 pm


Best of Bram.us
Start getting used to scratching and smudging the iPhone with this Flash based iPhone Simulator
Automatically wrap/float/contour text around freeform images using CSS for usage in (X)HTML pages.
Pimp Your Firefox to be a web all-star
A look at the inc.common.php, spreading handy functions.
Photoshop Script inspired in the Chlomoscript to unobtrusively pimp photos you have taken.
Methods to adding file management options to TinyMCE (Part 1), Extending TinyFCK (Part 2) and PHP file uploads overview (Spinoff 1).









Trackbacks/Pings
[...] Note #3: getting a myLightBox is undefined error? Great, you’re using the most recent Lightbox version … and that one requires 1 tiny fix [...]
Comments
There is no need to change lightbox.js.I just change mylightbox to lightbox and fixed problem