I have been trying to get a cross server socket issue resolved during the past couple of days – and solved it today!

As many on this list have been very responsive and of great help I want to share this little hint to help you not making the same mistake:

 

The Macromedia documentation states that loading an XML policy file can be done with a call to

 

System.security.loadPolicyFile

 

While the Flex 2.0 compiler throws no compile time error you get an error during runtime stating that the method security cannot be found. The reason for that is that there is a namespace error in almost all the documentation I found online.

 

The correct call is either

 

flash.system.Security.loadPolicyFile(url:String);

 

or

 

Security.loadPolicyFile(url:String) if you have an   import flash.system.*; statement at the beginning of your code.

 

And by the way: This not only works for connections via the HTTP, HTTPS or FTP protocol but also for Socket and XMLSocket.

 

Best regards

 

Ralf Rottmann

 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to