I had the same questions and I did some testing today.

If you are using URLLoader.load you don't have to use the use-network 
compiler switch.

Assuming you are using relative URLs, as in URLLoader.load(new 
URLRequest("data.file")), you will be able to load from local to local 
(when testing your app in FlashBuilder) and remote to remote (when you 
deploy).

I think the compiler switch is for (remote ?) applications that use 
local data files (so they can either use only local data files or only 
remote data files)

-- Raffaele


aaron smith wrote:
> Ok question about using the -use-network switch.
> 
> why do you have to use that to access local files. That just seems like 
> a pain. why would you have to switch back and forth depending on you're 
> build type. DEV sv LIVE. What if in some cases you're DEV version needs 
> to access network for remoting or wsdls? Or services other vendor's 
> provide..
> 
> Is this absolutely neccessary to use in order to access local file system?
> 
> thanks.
> 
> 
> 
> 
> 
> On 8/13/06, *Samuel Colak* < [EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
> 
>     Aaron,
> 
>     there is a space in the filename " menu.xml" and i also think it
>     might be in the resources directory - try "resources/menu.xml" -
>     when you go and publish this you need to be aware that the relative
>     path is from the root of the webserver - not the path of the flash
>     file.
> 
>     I have a nice utility library which does this and also loads jpgs
>     etc in a queue fashion if you are interested.
> 
>     Regards
>     Samuel
> 
> 
>     On 13 Aug 2006, at 02:45, aaron smith wrote:
> 
>>     how do I load local XML?
>>
>>     I was doing this:
>>
>>     private function loadXML():void
>>             {
>>                 myXML = new XML();
>>                 myXMLURL = new URLRequest(XML_URL);
>>                 myLoader = new URLLoader(" menu.xml");
>>                 myLoader.addEventListener("complete", xmlLoaded);
>>             }
>>            
>>             private function xmlLoaded():void
>>             {
>>                 myXML = XML(myLoader.data);
>>                 trace("Data loaded.");
>>             }
>>
>>
>>
>>     but it spits out errors. Is there security issues?
>>
>>     here are the errors..
>>
>>     SWF filefile:///C|/Document
>>     s%20and%20Settings/aaronsh/Desktop/dev/flash/%5F%
>>     20AS3%20TESTING/3waylayout/classes/Main. swf cannot access local
>>     resource file:///C|/Documents%20and%20Settings/aaronsh/
>>     Desktop/dev/flash/%5F%20AS3%20TESTING/3waylayout/ classes/menu.xml
>>     . Only local-with-filesyst em and trusted local SWF files may
>>     access local resources.
>>
>>
>>     Do i need to do something different for local files? I would think
>>     it would be the same as how you load from a URL...
>>
>>     thanks.
>>
> 
> 
>  !DSPAM:44df440397918033519354!


--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to