Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Crazy loadVariablesNum

Can't find my local file?



7:02 pm on Aug 1, 2007 (gmt 0)

10+ Year Member

So I'm using the following:


And get this error when running a test:

Error opening URL "file:///C/Documents%20and%20Settings/Administrator/Desktop/SiteCandy/photogallery/data.txt?width=undefined&height=undefined&focusManager=%5Flevel0%2EfocusManager&tabChildren=true&tabEnabled=false"

I have tried placing the flash and files into a directory that doesn't have spaces in the name, but I get the same "Error opening URL" message for the new URL.

What's going on here? Before anyone asks: Yes, I am certain the file is there.

EDIT: I used to be able to use this process on local files with no issue. I can use getURL on the file, and it opens in IE.


7:39 pm on Aug 1, 2007 (gmt 0)

10+ Year Member

I solved this on my own. It looks like my issue was with the "GET" parameter. .TXT files can not receive this parameter. Removing this solved the problem.


7:52 pm on Aug 1, 2007 (gmt 0)

5+ Year Member

All variables available on the current frame will be added to the string when using loadVariablesNum GET/POST. This is because the loadVariables function is ment to "talk" to an application and pull data back responding to some values you deliver. Take for example a login.php script where you need to send out a username and a password, and then receive back a validation variable.

In your case, where you only want to load a text-file with some simple vars in it, you can use this line instead:

loadVariables("data.txt", this);


Featured Threads

Hot Threads This Week

Hot Threads This Month