views:

88

answers:

3

hi,
I made a swf that interacts with other site on the internet (which has a crossdomainfile for me).
in the main.mxml there is a definition of webservice (mx:WebService)(which is not in my domain).
Therefore when loading the swf, there is a first call to crossdomainfile.xml.
I put this swf on my server so that my clients can get it.
When i connect to my server to download the swf, i expect to be asked if i want to allow the swf
connect to foreign webservice domain. But i am not being asked.
Do i always need to define exception in Global Security Settings panel?
I don't want my client do define special things..
Is there a best practice for that? Why when i surfing the net other swf can do this?
I read about the FlashPlayerTrust, can i define there a website i trust my swf will connect to?
anyone knows?

A: 

You ask a bunch of questions, I'll try to explain the best I can.

The loading of the crossdomain.xml file will occur when you access the WebService located on the remote domain; not when the swf containing the WebService call is loaded.

If a crossdomain.xml file is not there; the error is returned to the Flash Player. If you create a handler for that error, you can surpress that error from the user. IF no handler exists, I believe a run time error is displayed--but I haven't tested that.

If you want to be asked whether the swf can access the foreign domain or not; I'm pretty sure you'll have to write that code yourself.

I've never had to deal with Global Security Settings or FlashPlayerTrust in situations where I need to access a remote service.

www.Flextras.com
A: 

In my case, I get the crossDomain.xml from the foreign server, but fot some unknown reason, webservice request are not even sent from my computer to the remote server. But, when i am running from flash builder, everything works fine(i.e. the request are sent). strange... can't help here.
otherDomain.com crossDomain.xml contains getting from all domains(*) port=80,443(there is no nosecurity=false parameter). Therefore i am running my tomcat with secure connection - https://localhost:8443/myDir/main.html. I manage to get the crossDomainFile from www.otherDomain.com. Any further request for webservice (which is successful when running Flash builder) is not even sent. really weird!

ronk
A: 

the solution is to add headers permission to the crossdomainfile: allow-http-request-headers-from

detailed info is in http://kb2.adobe.com/cps/403/kb403185.html

ron