# as3+xml+lightwindow

**URL:** <https://forum.kirupa.com/t/as3-xml-lightwindow/280064>\
**Category:** flash\
**Created:** [January 22, 2009, 8:59am UTC](https://forum.kirupa.com/t/as3-xml-lightwindow/280064 "2009-01-22T08:59:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![diggz](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@diggz](https://forum.kirupa.com/u/diggz)\
**Post date:** [January 22, 2009, 8:59am UTC](https://forum.kirupa.com/t/as3-xml-lightwindow/280064/1 "2009-01-22T08:59:44Z")

</div>

hi all - really hope someone can sort me out with this question i have.

i am trying to get lightwindow to launch from my script in as3

i have some thumbnails that are generated via xml - and when clicked the thumbnail opens a url in a new window.

i want it to open in the lightwindow box instead.

this is the as that i have on my thumbnails

```php
function p_click(me:MouseEvent) 
{
var loader : Loader = new Loader (); 
var request : URLRequest = new URLRequest ( "javascript : myLightWindow.activateWindow({href: 'wall.swf', title: 'lightwindow', author: 'anon', height: 480, width: 640});" ); 
loader . load ( request ); 
navigateToURL ( request , '_parent' ); 
} 

```

but that doesn’t seem to work - i am using [this article](http://translate.google.com/translate?hl=en&sl=it&u=http://www.flepstudio.org/forum/flash-italiano/562-lightwindow-da-swf-con-as3.html&sa=X&oi=translate&resnum=10&ct=result&prev=/search%3Fq%3Das3%2Blightwindow%26num%3D100%26hl%3Den%26newwindow%3D1%26safe%3Doff%26sa%3DG) as my reference for what should go in the script for the button.

the script i used and it worked to open a url in a new window was

```php
function p_click(me:MouseEvent) 
{
	var sp:Sprite = me.target as Sprite;
	var s_no:Number = parseInt(sp.name.slice(8,10));
	navigateToURL(new URLRequest(url_list[s_no]), url_target_list[s_no]);
}

```

that opens the url from the xml doc. this how the items in the xml look

```php
<thumbnail filename="name_of_thumb.jpg" url="http://www.domainname.com/folder/item.mov" target="_blank" 
		title="Item title" 
		description="some text that shows up on thumbnail mouse over" />

```

i am really struggling with this - i have also dropped the swf into html doc for [lightwindow](http://www.stickmanlabs.com/lightwindow/)  
and the html links - open the lightwindow up perfectly but the swf doesn’t want to know.

has anyone managed to get this working before? or know of good points of reference to make it work from a flash button/xml.

there is no support on the stickman site - lots of config info - but not for flash?

is it even possible in flash? anyone know?

in summary how do i trigger lightwindow from an as3 button???
