Jul 25, 2008

Actionscript : Using Loadvars() Online. - I need help with using LoadVars(); online.

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Others

free web hosting

Actionscript : Using Loadvars() Online. - I need help with using LoadVars(); online.

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

 

 

 


Reply

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

Reply

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

Reply

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

Reply

ewcreators
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

Reply

galexcd
QUOTE(ewcreators @ Mar 23 2008, 03:57 AM) *
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.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. loadvars only on root - 21.75 hr back. (1)
  2. actionscript loadvars xml - 139.86 hr back. (1)
Similar Topics

Keywords : actionscript, loadvars, online, loadvars, online,

  1. Flash - Streaming Flv With Interactible Objects
    Actionscript 3.0 - syncronising swf with flv (3)
  2. Contact Form Actionscript
    help needed (3)
    please I need help for an ActionScript to use for the contact form in a flash website I'm using
    Flash MX 2004.......
  3. Actionscript For Newbies
    (2)
    To make a new variable (declare a new variable): Type the statement: var x; where x is the name of
    the variable; To put some data in already made (declared): x = " data "; The statement must end
    with a " ; ". ....
  4. Actionscript
    -need help plz (2)
    Can anyone help me out with a flash file externaly refreshing an html page, and gathering
    information from a database there, without the user seeing this. This means the loading bar on the
    page the flash is on CANNOT be loading. I need to make an avatar chat, so when you move around it
    shows up on other people's computers. P.S. If any admins see this post, can you please create
    an action script subform? ....
  5. First Star Online
    (0)
    First I just want to say I wasn't sure exactly where to put this, I was wondering if anyone
    knows any information about a program called First Star Online, what it is, is this: Its a
    development kit for programming your own mmorpgs, its rather simple and has a large range for
    support. I know its freeware, and there are several servers running: Foresthaven.tk and
    terraworld (Don't know the site for it) I am really interested in using it, so if anyone
    could help me find the devlopment kit i'd really appreciate it XD! Thanks in advance~....

    1. Looking for actionscript, loadvars, online, loadvars, online,

Searching Video's for actionscript, loadvars, online, loadvars, online,
advertisement



Actionscript : Using Loadvars() Online. - I need help with using LoadVars(); online.



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE