amCharts support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flash Charts: Flash Charts Bundle


#1 2012-06-21 06:56:35

flash movie getData() crossdomain

Hi,

i'm getting this error:

Uncaught Error: Error in Actionscript. Use a try/catch block to find error. adaptaciones_loe.js:33
Uncaught Error: Error calling method on NPObject.

when i',m using getData() of my flashMovie. This only happens when i try to get data from another server. i set allowScriptAccess to always and the crossdomain.xml of my server is :

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>

Could you help me, please??

Offline

 

#2 2012-06-21 07:27:34

martynasma
Administrator

Re: flash movie getData() crossdomain

Is the JavaScript that tries to use getData() loaded from the same host as amline.swf? If it's not, Flash security restrictions are in effect. I'm afraid there's nothing we can do about it.

Offline

 

#3 2012-06-22 01:42:30

Re: flash movie getData() crossdomain

Javascript and amline.swf are all loaded from the same host. We are showing the chart in one domain (A) but data, setting, amline.swf and the javascript code are all in another domain (B).

Notice that data & settings are correctly loaded from domain B when the chart starts.

Offline

 

#4 2012-06-25 04:20:50

martynasma
Administrator

Re: flash movie getData() crossdomain

I'm afraid you will need to put swf into the same domain as your page in order to satisfy security restrictions. I suggest you try that for the sake of test.

Offline

 

#5 2012-06-26 03:36:24

Re: flash movie getData() crossdomain

It works fine when the swf and my page are in the same domain, but i need to put it on differents domains. Is there any solution?

Offline

 

#6 2012-06-26 03:58:51

martynasma
Administrator

Re: flash movie getData() crossdomain

Flash prohibits JavaScript interaction between the page and SWFs hosted on different hosts. I'm afraid there's no solution to this.

Offline

 

© amCharts | Forum engine: PunBB