# getURL variable sending to second swf with xml

**URL:** https://forum.kirupa.com/t/geturl-variable-sending-to-second-swf-with-xml/255256
**Category:** flash
**Created:** [March 20, 2008, 1:34pm UTC](https://forum.kirupa.com/t/geturl-variable-sending-to-second-swf-with-xml/255256 "2008-03-20T13:34:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bnw1984](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@bnw1984](https://forum.kirupa.com/u/bnw1984)
#### Post date: [March 20, 2008, 1:34pm UTC](https://forum.kirupa.com/t/geturl-variable-sending-to-second-swf-with-xml/255256/1 "2008-03-20T13:34:09Z")

</div>

Hi,

PURPOSE

- in the first swf I set a var
- I send that var to a second swf by using the getURL method
- in that second swf, the var is used as a (part of a) xml filename  
(eg “variable.xml”)  
==\> in that way I can load for each user the appropiate xml file into a photogallery

SENDING SWF:

```auto

on (release, keyPress "<Enter>") {
    var userN:String;
    
    //project01
        if (username == "VanOverwalle" && Password == "VO86") {
            
            userN = "VanO.xml";
                   
            getURL("login/loginGallery.swf?userN="+userN, "_blank");
                        
        } else if (username == "VanO_admin" && Password == "VO87") {
                      //something else

                        
    //project02
               } else if ( ...
...

```

RECEIVING SWF

```auto

//Load xml
//userN = "VanOverwalle.xml"; --> works fine

xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
// --> doesn't work
xmlData.load(gebruiker);

```

–\> when I trace the sending movie, I can see that the variable is made as it shoud be  
–\> the URL is opened and I can see the userN in the URL  
–\> but the xml isn’t loaded

ADVICES ?

cu  
bnw1984
