0

Edit: I mixed a.com and b.com in my original post, I'll try to rephrase stuff correctly:

  • A HTML page is loaded from a.com
  • The HTML embeds a Flash client from b.com
  • HTML contains a Javascript function that makes a connection to a.com, ie the origin of the HTML, not the origin of Flash
  • The Flash calls that Javascript function

Question: Do I need to have a crossdomain.xml in a.com?

fish
  • 1,050
  • 9
  • 13

2 Answers2

3

Please provide more details and in the meantime take a look at flash parameter :

<param name="allowScriptAccess" value="sameDomain" />

"sameDomain" is the default value As said in http://kb2.adobe.com/cps/164/tn_16494.html

When AllowScriptAccess is "always", the SWF file can communicate with the HTML page in which it is embedded even when the SWF file is from a different domain than the HTML page.

Christ-OFF
  • 434
  • 7
  • 21
  • I made some changes to the original post. I need to know if the Javascript called by the Flash client is allowed to connect to its origin. – fish Nov 04 '10 at 10:49
  • As said in the adobe page : "The AllowScriptAccess parameter in the HTML code that loads a SWF file controls the ability to perform outbound URL access from within the SWF file." You won't need a crossdomain (crossdomain is for blazeds) but you'l need – Christ-OFF Nov 05 '10 at 12:21
2

Cross - domain restrictions are enforced in Javascript by the browser (normally). Depending on what you need to do, however, there are a number of workarounds. Perhaps if you provided more details?


EDIT:

You will need to use

<param name="allowScriptAccess" value="always" />

Cross - domain SWFs cannot normally access a web page, unless you use this, due to trust issues.

Ioannis Karadimas
  • 7,746
  • 3
  • 35
  • 45
  • I hade a mistake in my original post and also rephrased the thing, maybe it's more clear now? – fish Nov 04 '10 at 10:42
  • I 've updated my post as well. Check it out and see if it works for you. Unfortunately, I can't test it at the moment. Oh, and you don't need a crossdomain.xml file. – Ioannis Karadimas Nov 04 '10 at 12:16