Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Store a value in a variable

Status
Not open for further replies.

2618

Programmer
Jul 13, 2000
3
0
0
IT
Hi I had a question about using keyboard input.<br>I will make a text field like this:<br><br>name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value name<br>number:&nbsp;&nbsp;&nbsp;&nbsp;value number<br><br>Now I will store the values of both in a variable.<br>And reuse the values at a liter moment.<br>How can I do this ??<br><br>Tobias<br><br><br>
 
easiest way is to declare them as globals.&nbsp;&nbsp;best place to do this is in the startmovie script with initial values and at the top of every script that will use them.<br><br>ie <br>global name, number<br>on startmovie<br>set name = &quot;&quot;<br>set number = 0<br>end startmovie<br><br>in the scripts that you want to assign the values to these variables to put something like<br><br>global name, number<br>on mouseup (or how you want to trigger the event)<br>set name = member(&quot;name text&quot;).text<br>set number = member(&quot;number text&quot;).text<br>end<br><br>all done.&nbsp;&nbsp;you need to put the global declaration at the top of any script that uses them
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top