So I am building a little Flex piece, and needed to use the lightbox.js in actionscript 3.Â I originally found this post: Calling Lightbox.js from Flash (although it was built using AS2).
Adapt it to AS3 by:
tags of the file that will house your SWF
var imgLink = document.createElement('a');
2. In your actionscript you would add this (in my case, Flex):
private function runLightbox(eventObject:MouseEvent):void
var lightBoxCommand:String = "lightBoxInit('images/" + this.image + ".jpg');";
PS. make sure your swf param’s allowScriptAccess “always”.