# Problem with Loadvars

**URL:** <https://forum.kirupa.com/t/problem-with-loadvars/184226>\
**Category:** flash\
**Created:** [April 3, 2006, 2:41pm UTC](https://forum.kirupa.com/t/problem-with-loadvars/184226 "2006-04-03T14:41:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dante2010](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dante2010](https://forum.kirupa.com/u/dante2010)\
**Post date:** [April 3, 2006, 2:41pm UTC](https://forum.kirupa.com/t/problem-with-loadvars/184226/1 "2006-04-03T14:41:46Z")

</div>

Hi,

I’m trying to use the following piece of code to load variables from an external URL into my flash. It works on one server (development server) but not on my production server. I was just wondering if there’s anything to do with server setup that would cause it to fail?

```auto

this.params_lv = new LoadVars();
var owner:form1 = this;
this.params_lv.onLoad = function (success:Boolean) { owner.onLoadVarsDone(success); }
		
this.loadLink = "http://www.myserver.com/client/1853/html/index.cfm?fuseaction=ppty.getMap";
this.ID = 0;
this.params_lv.load(this.loadLink+"&ID="+this.ID);

function onLoadVarsDone(success:Boolean):Void {
    if(success){
	    this.loadMap(this.params_lv.mapFile)
	} 
	else{ 
	    this.alert('Error: Cannot connect to server');
	}
	
   }

```

This exact code works on one server and doesn’t on another. On the one that it doesn’t work on it always hits the alert(‘Error: Cannot connect to server’); … and I have no idea why!!

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 3, 2006, 2:44pm UTC](https://forum.kirupa.com/t/problem-with-loadvars/184226/2 "2006-04-03T14:44:44Z")

</div>

Does this “production server” have ColdFusion?

---

<div class="post-metadata">

**Author:** ![dante2010](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@dante2010](https://forum.kirupa.com/u/dante2010)\
**Post date:** [April 3, 2006, 2:52pm UTC](https://forum.kirupa.com/t/problem-with-loadvars/184226/3 "2006-04-03T14:52:39Z")

</div>

Yes both servers have Coldfusion.

---

<div class="post-metadata">

**Author:** ![kernel\_flash](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@kernel\_flash](https://forum.kirupa.com/u/kernel_flash)\
**Post date:** [April 4, 2006, 4:29am UTC](https://forum.kirupa.com/t/problem-with-loadvars/184226/4 "2006-04-04T04:29:05Z")

</div>

The security feature of the flash player may be affecting the code.  
If the server which you are trying to access is on a domain other than the one where your swf resides, the flash player won’t allow you to do so.  
See security related help in flash documentation.  
Above problem can be solved using crossdomain.xml file which lists the authentic hosts from where the swfs will be accessing the server.
