1 Reply Latest reply on Jul 23, 2011 11:28 PM by Flex harUI

    About Sandbox. Please Help.

    Wingnow

      Don't understand sandbox type in SWF.

      Please help me understand this issue.

       

      1. Is that the SWF access on the internet, the Sandbox Type must be "Remote"?

       

      2. I don't understand how to make this example not showing error, what should be the Sandbox Type?

      "Local with filesystem" or "Remote"?

      In the comment, it said "run this SWF from a server", it should be "Remote"?

      But it also said "allowing local file-access permissions", it should be "Local with filesystem"?

       

       

      <fx:Script><![CDATA[

           import flash.net.URLLoader;

           import flash.net.URLRequest;

           import flash.events.SecurityErrorEvent;

           import mx.controls.Alert;

       

           private var loader:URLLoader = new URLLoader();

           private function triggerSecurityError():void {

       

                    var request:URLRequest = new URLRequest("c:/temp/feeds.txt");

                     // Triggers a security exception if you run this SWF from a server without

                     // explicitly allowing local file-access permissions.

       

                    try {

                         loader.load(request);

                    } catch (error:SecurityError) {

                         Alert.show(error.name + ": " + error.message);

                   }

       

           }

      ]]></fx:Script>