So I needed to use Flash to trigger some image viewing capabilities in GreyBox but found surprisingly little information on how to do it. After piecing several bits of knowledge together, I got it working to my liking. Here it is for anyone else who searches for it (including me.)
Install GreyBox as you normally would. You can download the package and installation / usage instructions from the fine folks at Orangoo: http://orangoo.com/labs/GreyBox/.
In your HTML, define an image set array for GreyBox to use and a function to call GreyBox and show a specified image:
<script type=”text/javascript”>
var image_set = [
{'caption': 'Image Number One', 'url': 'http://www.yourdomain.com/images/img_lg_01.jpg'},
{'caption': 'Image Number Two', 'url': 'http://www.yourdomain.com/images/img_lg_02.jpg'},
{'caption': 'Image Number Three', 'url': 'http://www.yourdomain.com/images/img_lg_03.jpg'},
{'caption': 'Image Number Four', 'url': 'http://www.yourdomain.com/images/img_lg_04.jpg'},
{'caption': 'Image Number Five', 'url': 'http://www.yourdomain.com/images/img_lg_05.jpg'},
{'caption': 'Image Number Six', 'url': 'http://www.yourdomain.com/images/img_lg_06.jpg'},
];
function doGreyBox(img_num) {
GB_showImageSet(image_set, img_num);
}
</script>
Now create a flash file. To make this example easy, place a standard button on the stage and put the code below on it (modify the following to call the image of your choosing from the image array you defined above.)
on (release) {
getURL(“javascript: doGreyBox(3)”); // This will trigger Image Number Three
}
Now add the flash to your HTML document and set wmode=transparent to ensure that flash will not remain on top of any GreyBox windows.
That’s it – not difficult, just Adobe Flash and GreyBox are not commonly used together for images. Feel free to modify the example above to get your job done. Questions or concerns – just leave a comment and I’ll do my best to help you out.


9 Comments
Thanks. This is what I needed.
Hi, I’m from Brazil.
It’s great! But don’t run correctly on Firefox or Opera or Chrome when we use on Internet server. Is perfect only localhost. Check this and you will see… the images don’t open at first time.
Is there a solution for this problem?
Thanks.. I’m going to try it, and report back with either my success or failure.
I see this is specifically for images.
I’m just trying to make a link “open in a fullscreen window”.
Can you tell me the differences in the steps I need to take?
i m working with flash to open graybox google but not done
please help if possible
thanks
its working, its calling the image but when you close the image the flash movie starts again from frame 1, why is that?
I’m curious to find out what blog system you happen to be utilizing? I’m having some small security
problems with my latest blog and I’d like to find something more safe. Do you have any recommendations?
I’ve been exploring for a bit for any high quality articles or blog posts on this kind of area . Exploring in Yahoo I ultimately stumbled upon this web site. Reading this info So i am satisfied to show that I have an incredibly good uncanny feeling I came upon exactly what I needed. I so much unquestionably will make sure to do not fail to remember this site and give it a look on a continuing basis.
It’s an awesome piece of writing in support of all the internet users; they will take benefit from it I am sure.