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

Reply via email to