# Variable change

**URL:** https://forum.kirupa.com/t/variable-change/120358
**Category:** Uncategorized
**Created:** [August 23, 2004, 6:19pm UTC](https://forum.kirupa.com/t/variable-change/120358 "2004-08-23T18:19:49Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![rlLife](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@rlLife](https://forum.kirupa.com/u/rlLife)
#### Post date: [August 23, 2004, 6:19pm UTC](https://forum.kirupa.com/t/variable-change/120358/1 "2004-08-23T18:19:49Z")

</div>

i know this should be very easy, i know i should know this already but here it goes.

how do i change this variable dynamically?

myvar = “[www.kirupa.com](http://www.kirupa.com)”

all i need to do is change it

rL

---

<div class="post-metadata">

### Author: ![claudio](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@claudio](https://forum.kirupa.com/u/claudio)
#### Post date: [August 23, 2004, 6:21pm UTC](https://forum.kirupa.com/t/variable-change/120358/2 "2004-08-23T18:21:38Z")

</div>

Simply use

```auto
myvar = "some other stuff";

```

---

<div class="post-metadata">

### Author: ![rlLife](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@rlLife](https://forum.kirupa.com/u/rlLife)
#### Post date: [August 23, 2004, 6:28pm UTC](https://forum.kirupa.com/t/variable-change/120358/3 "2004-08-23T18:28:13Z")

</div>

yeah can that be done with text file

---

<div class="post-metadata">

### Author: ![rlLife](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@rlLife](https://forum.kirupa.com/u/rlLife)
#### Post date: [August 23, 2004, 6:32pm UTC](https://forum.kirupa.com/t/variable-change/120358/4 "2004-08-23T18:32:54Z")

</div>

having the variable in flash with action script and then when it loads it pulls the new variable from txt file

---

<div class="post-metadata">

### Author: ![claudio](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@claudio](https://forum.kirupa.com/u/claudio)
#### Post date: [August 23, 2004, 6:39pm UTC](https://forum.kirupa.com/t/variable-change/120358/5 "2004-08-23T18:39:33Z")

</div>

Yes, you can use the LoadVars object.  
Textfile:

```auto
content=updated content

```

```auto
l = new LoadVars();
l.onLoad = function(success){
if(success){
myVar = this.content;
}
}
l.load("textfile.txt");

```

---

<div class="post-metadata">

### Author: ![rlLife](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@rlLife](https://forum.kirupa.com/u/rlLife)
#### Post date: [August 23, 2004, 6:48pm UTC](https://forum.kirupa.com/t/variable-change/120358/6 "2004-08-23T18:48:28Z")

</div>

yep that is what i was looking for. thanks so much, you always seem to be one step ahead (or 1000 steps).

rL 🙂

---

<div class="post-metadata">

### Author: ![claudio](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@claudio](https://forum.kirupa.com/u/claudio)
#### Post date: [August 23, 2004, 6:54pm UTC](https://forum.kirupa.com/t/variable-change/120358/7 "2004-08-23T18:54:43Z")

</div>

Glad i could help =)
