Security error accessing url

There is something that I am definately not understanding and I was hoping that someone could help me out here. It started with a little program in Flex getting to know the HttpService call in mxml. I had some code running in Eclipse and it worked fine so I tried it in IntelliJ and it went down hill from there. Let me give you some of the particulars:

I'm running Intellij 8.1.3, build 9886, the code that I'm testing can be found below.I have two Open Suse Linux boxs (11.1). Machine one is runnign IntelliJ and the other is running Eclipse with the old, unsupported Adobe FlexBuilder plugin.

On machine 1(IntelliJ).

What I did is I built the swf (HttpTestIntelliJ.swf) and tried to run it. I go an error where the event.fault.faultString  was equal to "Security error accessing url". I ran the swf by opening Firefox browser (running FlashPlayer 9.0.128) and giving the URL
file:///home/croe/working/flexProjects/HttpTest/out/production/HttpTest/HttpTestIntelliJ.swf  

On machine 2(Eclipse)
I build the swf HttpTestEclipse.swf and tried to run it. I ran it using the the URL file:///home/camroe/working/HttpTestEclipse/bin-debug/HttpTestEclipse.swf  and it works. i.e. I get a response back from Google.

I moved the HttpTestEclipse.swf from machine 1 to machine 2 and ran it using theURL file:///home/croe/tmp/HttpTestEclipse.swf  and it does not work with the same error message "Security error accessing url"  

There is something fundamental that I'm missing here and I would really appreciate a pointer to what it is that makes one swf  work in one directory and not in the other. Here is what I"ve tried or looked at

- md5sum of all copied files are the same
- any configuration files in the eclipse directory (there were none, but I removed all the other files anyway and it still works)
- both are compiled with -use-network=true
- all the compile flags seem to be the same.
- there are no hidden directories (.xx)
- there is no crossdomain.xml file on either machine (I'm not sure how it would be served anyway since no webservers are running).


Anyhelp would be appreciated.

Cheers

Cam











<?xml version="1.0" ?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                layout="vertical">
    <mx:Label text="Google Service Test Intellij"/>
    <mx:HTTPService id="GoogleService"
                    url="http://www.google.com/"
                    result="Alert.show('Google Respons')"
                    resultFormat="text"
                    fault="faultHandler(event)"/>
    <mx:Button id="ServiceButton"
               label="Call Google"
               click="{GoogleService.send()}"/>
    <mx:Label text="{GoogleService.lastResult}"/>
    <mx:Button click="Alert.show('Hello, world')" label="Hello Button"/>
    <mx:Script><![CDATA[
        import mx.controls.Alert;
        import mx.rpc.events.FaultEvent;
        private function faultHandler(event:FaultEvent):void
        {
            var faultInfo:String = "fault description: " + event.fault.faultDetail + "\n\n";
            faultInfo += "fault faultstring: " + event.fault.faultString + "\n\n";
            Alert.show(faultInfo, "Fault Information");
        }
        ]]></mx:Script>
</mx:Application>

1 comment
Comment actions Permalink

Hi Cam!

The short answer for you:

  • go to folder [app data]/Macromedia/Flash Player/#Security/FlashPlayerTrust/

(usually it is like /Users/[user-name]/Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust).

In case of Windows XP it is like C:\Documents and Settings\[user-name]\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust.

For Vista: C:\Users\[user-name]\AppData\Roaming\Macromedia\Flash Player\#Security\FlashPlayerTrust

  • create a file with any name and extension there. Let it be my_trusted.cfg
  • add path to your swf file or to the directory in which your swf file resides to my_trusted.cfg file


The long answer is: "Flash Player Security"
http://www.adobe.com/devnet/flashplayer/articles/flash_player_9_security.pdf

0

Please sign in to leave a comment.