# Image viewer in Flash (AS3)

**URL:** <https://forum.kirupa.com/t/image-viewer-in-flash-as3/323978>\
**Category:** flash\
**Created:** [July 26, 2011, 9:11pm UTC](https://forum.kirupa.com/t/image-viewer-in-flash-as3/323978 "2011-07-26T21:11:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![canaan77](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@canaan77](https://forum.kirupa.com/u/canaan77)\
**Post date:** [July 26, 2011, 9:11pm UTC](https://forum.kirupa.com/t/image-viewer-in-flash-as3/323978/1 "2011-07-26T21:11:10Z")

</div>

Hi guys!

I’ve made a website in Flash and I have a problem when it comes to show an image gallery on the site.

I want to use an image viewer that pops up when you click on a thumbnail and shows a larger image.

I have used Lightbox before when my site had been made only in html.

But now when my site is made in Flash I’ve tried to integrate Lightbox in Flash but  
I can’t get LightBox to work with Flash AS3.

I’ve followed this guide:

> **[Lightbox2 & Flash AS3 Redux](http://www.creativecompulsions.com/lightbox2-flash-as3-redux/)**
>
> Back in October I was building a Flash site and it required the use of a gallery. Since I almost always use LightBox for galleries, I wanted to do the same for this site. Problem is, I could not ge…

The problem with this guide is that the solution is not giving me the final result I want.

There are 2 problems:

1/ The next and prev buttons are not working (they are not visible) and therefore I can only show a single image. So I can’t use Lightbox as an image gallery with multiple images because I don’t have the next/prev buttons.  
The close button is visible but it doesn’t work (can’t close the window).

2/ When the Lightbox window opens/expands I want the background to be shown under/through Lightbox but instead a solid dark gray/black color replaces the background.

You can see the problem if you go to www.appcreator.se and click on the Screens tab.  
Then you click on the icons (there are only 2 icons yet) and Lightbox will be opened.

But without next/prev buttons…

As I said before I use AS3 and this guide is the only one I’ve found about integrating Lightbox in Flash.

If I don’t use Flash it’s very easy. I just use this procedure and put it in the html-code:

\<a href=“images/image-1.jpg” rel=“lightbox[roadtrip]”\>image #1\</a\>  
\<a href=“images/image-2.jpg” rel=“lightbox[roadtrip]”\>image #2\</a\>  
\<a href=“images/image-3.jpg” rel=“lightbox[roadtrip]”\>image #3\</a\>

But because I use Flash I don’t get these \<a href\> tags in my code.

So I don’t have a clue how to solve this problem.

Maybe it’s mission impossible?

Off course I dont’t have to use Lightbox for this. The important is that the images will open in a box, just like it does in Lightbox. So maybe there are some better alternative image viewers that you can integrate in Flash?

I know that you can make an image gallery from scratch in Flash, but I haven’t find any tutorials how to make the images pop up in another window(box) when I click on the thumbnail. Does anyone know how to do that? I suppose that is pretty complicated?

Maybe I can solve this in a different/better way?

I would be very grateful for some help/advice:).

/canaan77
