|
|
|
|
![]() ![]() |
Mar 20 2008, 01:20 PM
Post
#1
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 59 Joined: 28-August 07 Member No.: 48,983 |
http://revolutions.ifastnet.com/misc/myText1.txt:
CODE myVariable=How are you today?&money=10000 Actionscript: CODE var myData:LoadVars=new LoadVars(); myData.onLoad = function () { thelist.addItem(this.money); } myData.load("http://revolutions.ifastnet.com/misc/myText1.txt"); Now in my list component on my flash stage, when i run the .swf, where the money variable 10000 should be, it just says undefined,undefined. When i run the .swf from my local home directory, it says undefined and doesn't display the variable. Even when i upload it, it doesnt display the variable. Please help , since i want to display php details of my users of my website in a flash app which i will only do once i test my flash connections. |
|
|
|
Mar 20 2008, 05:49 PM
Post
#2
|
|
|
Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 975 Joined: 25-September 05 From: The dungeon deep below the foundation of trap17 Member No.: 12,251 |
Well I've never liked LoadVars too much. I much prefer the loadVariablesNum() function mainly because you don't have to use objects for it, but are you loading this data on the same level as where you are retrieving it? Meaning are you doing this on the root level and you are attempting to get the data in a movieclip? If thats not the case then I'd suggest using loadVariablesNum. Every time I have tried to use LoadVars it gives me tons of problems and loadVariablesNum just works instantly.
|
|
|
|
Mar 21 2008, 02:17 PM
Post
#3
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 59 Joined: 28-August 07 Member No.: 48,983 |
ok nvm that, im usingxml.
But how do i send data back to the server? like send("url",variable,method),i dont exactly know how to use this syntax. |
|
|
|
Mar 22 2008, 03:50 PM
Post
#4
|
|
|
Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 975 Joined: 25-September 05 From: The dungeon deep below the foundation of trap17 Member No.: 12,251 |
The loadVariablesNum method can do that too. And you can even specify if you want to send the variables to the server over post or get. I believe when you have the last parameter it automatically sends the server every variable that you have saved on that level.
Example: CODE loadVariablesNum ("file.xml", 0, "POST");
|
|
|
|
Mar 23 2008, 10:57 AM
Post
#5
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 59 Joined: 28-August 07 Member No.: 48,983 |
but shouldn't it actually be ("file.xml",variable=0,"GET"); for get? otherwise, how can we give it a name when using method post?
Also, how do we send strings then using loadVariablesNum |
|
|
|
Mar 26 2008, 05:59 PM
Post
#6
|
|
|
Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 975 Joined: 25-September 05 From: The dungeon deep below the foundation of trap17 Member No.: 12,251 |
but shouldn't it actually be ("file.xml",variable=0,"GET"); for get? otherwise, how can we give it a name when using method post? Also, how do we send strings then using loadVariablesNum Well yes, if you put "GET" in the parameter it will send the variables using get rather than post. It just depends on what type of variable your php page is looking for. And you can send strings the same way you send any other variable. Just set them to a string rather than a different variable. And, I don't know why you added variable=0 to the second parameter. It should just be 0. You can put a level in there if your code is executing on a different level. |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 25th July 2008 - 09:28 AM |