# Modifying a variable loaded in from a text file

**URL:** <https://forum.kirupa.com/t/modifying-a-variable-loaded-in-from-a-text-file/69993>\
**Category:** flash\
**Created:** [November 9, 2004, 8:39pm UTC](https://forum.kirupa.com/t/modifying-a-variable-loaded-in-from-a-text-file/69993 "2004-11-09T20:39:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hotgraphix](https://avatars.discourse-cdn.com/v4/letter/h/e36b37/32.png) [@hotgraphix](https://forum.kirupa.com/u/hotgraphix)\
**Post date:** [November 9, 2004, 8:39pm UTC](https://forum.kirupa.com/t/modifying-a-variable-loaded-in-from-a-text-file/69993/1 "2004-11-09T20:39:49Z")

</div>

[font=verdana, arial, helvetica][size=2]Is it possible to modify a variable such as &number=5 that was loaded in from a text file?

Can you do something like:  
newNumber = number + 4

Thus making ‘newNumber’ equal to 9.

The following code was provided to me but would not validate in flash:

(the text file used was called **number.txt** and the variable was **&myNumber=2**

* * *

## [/size][/font]var curNumber.Number = 0; var numberInfoLV.LoadVars = new LoadVars(); numberInfoLV.load(“number.txt”); curNumber = Number(numerInfoLV.myNuber) + 4;

Does anyone know how i can make this code work?[font=verdana, arial, helvetica][size=2] I would greatly appreciate your input. Thanks [/size][/font]
