homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

Crazy loadVariablesNum
Can't find my local file?

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

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)

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)

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved