Maybe I'm misreading something, but placing a crossdomain policy file in
boyd-speer.com to allow access from boyd-speer.com makes not much sense to
me...

The crossdomain file has to be placed in the target host, i.e. the server
that holds the php file. It says, let any swf server from this domain access
this host.

So, if you have your swf in, say, www.swfdomain.com and want to access
www.phpdomain.com/script.php, you have to place your crossdomain.xml in
phpdomain.com, granting access to, at least, www.swfdomain.com.

By the way, if you can put the file crossdomain file at the public root
level of the target host, you don't need to explicitly load the policy file
(the player will look up for it there if you make a crossdomain call and
don't specify a policy file).

Cheers
Juan Pablo Califano


2008/9/9, Robert Leisle <[EMAIL PROTECTED]>:
>
> Hi Boyd,
>
> Yes, you'll need to do import flash.system.Security; to use the
> loadPolicyFile method.
>
> Also, in your crossdomain.xml, you'll need to include
> <allow-access-from domain="www.boyd-speer.com"/>, or
> <allow-access-from domain="*.boyd-speer.com"/>
> The way it is coded now will only allow the specific domain,
> http://boyd-speer.com. Any differences to that (www, dev, etc.) will cause
> a
> mismatch and the domain will not be allowed.
>
> Hth,
> Bob
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of BOYD SPEER
> Sent: Tuesday, September 09, 2008 11:24 AM
> To: Flash Coders List
> Subject: [Flashcoders] getting loader to work with security policy...
>
> I'm having some diffuculty getting a loader object to call a php script
> that
> puts some data into the database (mysql) and returns a string.
> I placed a crossdomain.xml doc on the website at the level of the .swf. but
> can't seem to verify whether the policy doc is loaded or not. In AS3 do I
> have to do something like:
> import flash.security.*     to enable the code:
>
> var loader:URLLoader = new URLLoader();
>
>
> loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityErrorListe
> ner);
>
> Security.loadPolicyFile("
> http://www.boyd-speer.com/autoinfo/Irish/src/crossd
> omain.xml");
>
>   loader.addEventListener(Event.COMPLETE,loadcomplete);
>
>   loader.load(request);
>
>   function loadcomplete(evt:Event):void {
>    fscommand("loadcompleted...");
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to