PDA

View Full Version : URLRequest, URLLoader & an external txt file


freakyp
12-04-2008, 02:26 PM
Hi all,

I'm trying to load a text file into a swf via URLRequest and URLLoader. So far everything is working fine when I do local testing. The next step is to publish a swf file to one location, and put the txt file on a different server on the local network.

Right now, the way I navigate to the file via Explorer is as follows:

P:\_galleryEntrances\fileName.txt

The P: Drive is a network location mounted by windows.

This is my current URLRequest
gEvents.load(new URLRequest("riverscout.txt"));

So I guess my question(s) is(are):
Can URLRequest traverse a local network?
If so, then how do I structure the file path to work with Windows? is it different to work with mac?


Thanks in advance, sorry if this belongs in the newb section.. And yes, I did a search, couldn't find anything about local network access.

elaniobro
12-04-2008, 04:42 PM
Have you tried using an absolute path instead of a relative one?

gEvents.load(new URLRequest("P:\_galleryEntrances\fileName.txt"));

freakyp
12-04-2008, 07:48 PM
Thanks for the suggestion. The issue was with the sandbox. I was able to add the appropriate hosts to the AS3.0 to allow it to read for them external file.

Thanks for the reply though :D