1 Reply Latest reply on May 7, 2008 12:47 PM by ntsiii

    security error accessing url

    larcelarcen Level 1
      I'm using flex builder to create a small flex project to learn how to
      call web service in flex,but I encountered a problem really confusing
      me.I created a new file called wstest.mxml and here's its content:
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      import mx.controls.Alert;
      import mx.rpc.Fault;
      import mx.rpc.events.FaultEvent;

      private function onFault(event :
      FaultEvent) : void
      var f : Fault = event.fault;

      private function list() : void
      <mx:WebService id="adminService" service="Weather"
      wsdl=" http://www.wopos.com/webservice/weather.asmx?
      wsdl" showBusyCursor="true"
      <mx:operation name="getWeather">
      <mx:Label id="lbl"
      <mx:Button label="Call Web Service" click="list()"/>
      After building finished,I ran the generated wstest.swf in the
      directory called bin,the output directory of the flex
      project,everything is ok.But when I put the swf file in another
      position, say, c:/. Then when I ran the swf file an error message was
      returned saying 'Security error accessing url'. I can't understand
      why this happened. It seems the swf file can only run under the bin
      directory. Any one can help? Thanks!