# Trouble with global variable!

**URL:** https://forum.kirupa.com/t/trouble-with-global-variable/289263
**Category:** Uncategorized
**Created:** [May 28, 2009, 6:46am UTC](https://forum.kirupa.com/t/trouble-with-global-variable/289263 "2009-05-28T06:46:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cloudiness](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@cloudiness](https://forum.kirupa.com/u/cloudiness)
#### Post date: [May 28, 2009, 6:46am UTC](https://forum.kirupa.com/t/trouble-with-global-variable/289263/1 "2009-05-28T06:46:46Z")

</div>

i’m having a hard time getting my global variable to work with my xml gallery.

i have a button which has the url of the xml file I want to load, so when I press the button the gallery will display the xml file I chose.

here’s my button code:

```auto

on(press){
    _global.GALLERY = url;
    //url = gallery1.xml
    }

```

and the code in another clip for the images is:

```auto
gallery_xml.load(_global.GALLERY);

```

I have a feeling im plain doing it wrong.  
any ideas?? I hope this is pretty basic.
