# How to get xml thumbnails to open popups

**URL:** <https://forum.kirupa.com/t/how-to-get-xml-thumbnails-to-open-popups/309186>\
**Category:** Uncategorized\
**Created:** [May 9, 2010, 4:20am UTC](https://forum.kirupa.com/t/how-to-get-xml-thumbnails-to-open-popups/309186 "2010-05-09T04:20:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Panama](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@Panama](https://forum.kirupa.com/u/Panama)\
**Post date:** [May 9, 2010, 4:20am UTC](https://forum.kirupa.com/t/how-to-get-xml-thumbnails-to-open-popups/309186/1 "2010-05-09T04:20:46Z")

</div>

I`ve been searching for the answer to this question, which I have a hunch must be an easy one, but I`m not finding the solution! Can anyone help?  
I’ve set up an xml driven scroll of text items, each item when clicked must open up a new url, but (here´s the part I don´t know how to do) the url needs to open in a popup.

Its a pretty standard scroll, here´s the actionscript:  
var item\_title:Array = new Array();  
var item\_url:Array = new Array();  
var item\_description:Array = new Array();  
var total:Number;  
var i:Number = 0;  
var p:Number = 0;  
var item\_spacing:Number = 5;  
var scrolling\_speed:Number = 0.30; // 0.00 to 1.00  
var cv:Number = 0;  
var cv\_old:Number = 0;  
var on\_drag:Boolean;  
var xml:XML = new XML();  
item\_list\_area.\_visible = false;  
item\_list.setMask(item\_mask);  
stop();

xml.onLoad = function()  
{  
item\_list.fm\_item.\_visible = false;  
var nodes = this.firstChild.childNodes;  
total = nodes.length;

```
for( i = 0; i &lt; total; i++)
{
    item_title* = nodes*.attributes.title;
    item_url* = nodes*.attributes.url;
    item_description* = nodes*.attributes.description;
}
create_item_list();
scroller();

```

}  
xml.load( “Prensa.xml” );  
xml.ignoreWhite = true;  
function create\_item\_list():Void  
{  
for( i = 0; i \< total; i++)  
{  
var item = item\_list.fm\_item.duplicateMovieClip(“fm\_item”+i, i);  
item.\_y = i \* (item\_list.fm\_item.\_height + item\_spacing);  
item.item\_title.text = item\_title\*;  
item.item\_description.text = item\_description\*;  
item.no = i;

```
    item.item_button.onRelease = function()
    {
        getURL(item_url[this._parent.no]);
    }
}

```

}  
function scroller():Void  
{  
scroller\_mc.\_y = scrollable\_area\_mc.\_y;  
item\_list.\_y = item\_list\_area.\_y;  
sr = item\_list\_area.\_height/item\_list.\_height;  
scroller\_mc.\_height = scrollable\_area\_mc.\_height \* sr;  
sd = scrollable\_area\_mc.\_height - scroller\_mc.\_height;  
cd = item\_list.\_height - item\_list\_area.\_height;  
cr = cd / sd;

```
if( item_list._height &lt;= item_list_area._height )
{
    scroller_mc._visible = scrollable_area_mc._visible = false;
}
else
{
    scroller_mc._visible = scrollable_area_mc._visible = true;
}
scroller_mc.onPress = function()
{
    this.startDrag(false, this._x, scrollable_area_mc._y, this._x, 
                   scrollable_area_mc._y + scrollable_area_mc._height - this._height);
    on_drag = true;
    this.onEnterFrame = function()
    {
        new_y = item_list_area._y + scrollable_area_mc._y*cr - this._y*cr;
        cv = (new_y - item_list._y) * scrolling_speed;
        item_list._y += cv;
        if( on_drag == false && cv_old == cv )
            delete this.onEnterFrame;
        cv_old = cv;
    }
}
scroller_mc.onRelease = scroller_mc.onReleaseOutside = function()
{
    this.stopDrag();
    on_drag = false;
}

```

}

The xml is set up like this:  
\<items\>  
\<item title=“Headline” url=“[http://www.websiteaddress.html](http://www.websiteaddress.html) \_blank”  
description=“A few words about the article” /\>

etc.
