Urgent help need

whatever i type in the text field, and press save, then the same should appear on the label [in web player]…
whenever u reload the last saved result should appear on the label as well as in the text field

see image to understand more better ::

http://www.image-share.com/ijpg-742-82.html

i just made a small script called label.js

and this is the code in it

please let me know how can i save and change the label value in run time…thanks

Replace these 2 lines:

var textFieldString1 = “text field”;
textFieldString1 = GUI.TextField (Rect (210, 40, 120,20), textFieldString1);

with this line:

label1 = GUI.TextField (Rect (210, 40, 120,20), label1);

but image u compile it and then u change text in ur textfield and press save, then u again reload the webplayer…i dont think the label will change…isnt it ???

what to do for that ?

as saurabh mentioned, when i am in webplayer, i write something on the text script and press the save button, then i want the label to read that data… whosoever opens the webplayer link he should see the label with latest text in text field…

So what you want is that after you play the level and change the text in the text field, for the change to stay even after you stop playing and replay the level. You can’t dynamically change what’s written inside a script once it’s been compiled. To do something like what you want, you would need to be accessing the text from an external file and saving the text back onto that file sometime afterwards.

hiii yes as ersaurabh101 read it right, i need to save it dynamically…help me on this plz

can any1 help me on dis ?

You can store small pieces of data between sessions using the PlayerPrefs class, in this case with the GetString and SetString functions.