# Using a variable to launch QT Lightbox

**URL:** <https://forum.kirupa.com/t/using-a-variable-to-launch-qt-lightbox/290979>\
**Category:** flash\
**Created:** [June 23, 2009, 7:27am UTC](https://forum.kirupa.com/t/using-a-variable-to-launch-qt-lightbox/290979 "2009-06-23T07:27:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flail](https://avatars.discourse-cdn.com/v4/letter/f/0ea827/32.png) [@flail](https://forum.kirupa.com/u/flail)\
**Post date:** [June 23, 2009, 7:27am UTC](https://forum.kirupa.com/t/using-a-variable-to-launch-qt-lightbox/290979/1 "2009-06-23T07:27:23Z")

</div>

Hello,

This is fairly complex, but I’d really appreciate some help.

I’m trying to tweak some existing AS3 code that links to a URL, based on the “targetFrame” var. So can instead of having an html link, I’d like to use a javascript to open a lightbox of a quicktime movie.

I know how to:  
-Launch the lightbox for the quicktime movie from HTML.  
-Launch a lightbox for _an image_ from AS.

But not the combination of both. So my question is:

How do I use the “targetFrame” var in a way that javascript will call the right file in the lightbox command.

What I have now (calling the jpg file in the browser window):

```auto
	private function clickHandler( e:MouseEvent ):void {
	var request:URLRequest = new URLRequest( _node["@href"] );
	var targetFrame:String = ( _node["@target"] == undefined ) ? "_self" : _node["@target"];
	navigateToURL( request, targetFrame );
	}

```

The lightbox I’ve used in the past to launch quicktime movies from HTML is **[Shadowbox](http://www.shadowbox-js.com/)**, but I’m not particular.

If anyone has an code suggestions for the above OR an idea for a good quicktime-enabled lightbox script that can be launched from action script, I will be forever grateful.

THANK YOU!
