tags:

views:

20

answers:

1

I tried to deploy my otherwise working flex app on a web server (tomcat 6). It threw a Channel.Security.Error. After some research, I became aware that flash movie loaded from flash_movie_domain will not be able to load resource from any other domain. Some suggested adding a crossdomain.xml. However, the crossdomain.xml route doesn't quite make sense.

In this case, I am loading resources from a third party web site. My understanding is that I need this third party website to include a crossdomain.xml on their root directory in order for app to function. The third party web service is provided as is. I will not be able to change what's given. Since the third party is providing public access, it already explicitly give permission to the general public. Adding a crossdomain.xml to their root seems to be a redundant act?

At the end of the day, I need to figure out a way to access the third party web service from a flash movie loaded from my domain. Thanks.

A: 

It sounds like you already have your answer.

This third party web site will need add a crossdomain.xml file that will allow the Flash Player to access data from this third party domain.

I'm unclear how this third party web site has provided you permission to access their data. But, the Flash Player is placed in a sandbox by the browser. The crossdomain.xml file gives permission for the Flash Player to move out of it's sandbox for the purpose of accessing the remote domain.

There is nothing redundant about saying something can do done; and giving providing the technical tools to help make it happen.

Your alternative is to not access the site from Flash. You might be able to use an intermediary proxy to retrieve the data and send it back to flex. But, it depends on the type of data.

www.Flextras.com
The third party web service is open to public. I can run my Flash app in the Local-Trusted sandbox. In that sense, the owner of the third party web service has implicitly given permission to the public to their service. By moving my Flash app into Remote sandbox, Flash Player itself restricted the access of the app, not the original provider of the resource. Basically, Flash Player requires all public web sites to declare that they allow certain access via crossdomain.xml.
Candy Chiu
You said: "Basically, Flash Player requires all public web sites to declare that they allow certain access via crossdomain.xml" That is correct! I believe such an approach is designed to help prevent cross site scripting attacks; but such is not my expertise.
www.Flextras.com