# Cross domain issue between AS3 and JSON

**URL:** https://forum.kirupa.com/t/cross-domain-issue-between-as3-and-json/330384
**Category:** flash
**Created:** [January 11, 2013, 8:56pm UTC](https://forum.kirupa.com/t/cross-domain-issue-between-as3-and-json/330384 "2013-01-11T20:56:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Antsuperhack](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Antsuperhack](https://forum.kirupa.com/u/Antsuperhack)
#### Post date: [January 11, 2013, 8:56pm UTC](https://forum.kirupa.com/t/cross-domain-issue-between-as3-and-json/330384/1 "2013-01-11T20:56:31Z")

</div>

Hey all,

A very quick question …

Why when I test my fla file do I get the result I want but when I either open the swf file or upload it to my website does it stop working? The URL Request is for the same website as where the swf file is located so I don’t see the issue/

```auto
var myRequest:URLRequest = new URLRequest("http://dicehunters.co.uk/proxy.php?url=http://furydivine.net/api/hunt-dice/");var myLoader = new URLLoader();
myLoader.load(myRequest);
myLoader.addEventListener(Event.COMPLETE, onload);

function onload(evt:Event):void {
	
	var myData:Object = com.adobe.serialization.json.JSON.decode(myLoader.data);
}

```
