hi all,any problem with my code?
(has message error =faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Destination: DefaultHTTP')
<mx:Application
***
creationComplete="xmlHttpService.send();"
>
<mx:HTTPService
id="xmlHttpService"
url="
http://localhost/switch.xml"
result="xmlResultSuccess(event)"
resultFormat="e4x"
fault="xmlResultFailure(event);"
/>
[Bindable]
private var xmldata:XML;
private function init():void {
Security.loadPolicyFile("
http://localhost/switch.xml");
xmlHttpService.send();
initLogging();
initData();
var graph:Graph = new Graph("graph_id",false,xmldata);
vgraph.graph = graph;
}
private function xmlResultSuccess( event:ResultEvent ):void
{
xmldata = event.result as XML;
initData();
}
private function xmlResultFailure( event:FaultEvent ):void
{
Alert.show( event.fault.message, "Error loading XML" );
}
private function initData():void {
vgraph.graph = new Graph("XMLAsDocsGraph",false,xmldata);
}