# On rollover and on rollout

**URL:** <https://forum.kirupa.com/t/on-rollover-and-on-rollout/26643>\
**Category:** Uncategorized\
**Created:** [July 24, 2003, 11:45pm UTC](https://forum.kirupa.com/t/on-rollover-and-on-rollout/26643 "2003-07-24T23:45:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Afro\_Ninja](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Afro\_Ninja](https://forum.kirupa.com/u/Afro_Ninja)\
**Post date:** [July 24, 2003, 11:45pm UTC](https://forum.kirupa.com/t/on-rollover-and-on-rollout/26643/1 "2003-07-24T23:45:42Z")

</div>

Right, well here’s another pitiful question for you gods of flash… 🙂

so anyways I’m makin’ a navbar for my site. I have a dynamic text field named “display”. I want all the buttons on the bar to light up and change the variable “display” to um… “home” for example. and then on rollout go back to “click a button”

so I made a button and put this code with it:

on (rollOver){

```
_root.display = Home;

```

}

on (rollOut){

```
_root.display = Click a Button;

```

}

I figure there’s just something wrong with the syntax, cause all I’ve ever had to change before were variable values, not characters/strings.

btw I just moved up to MX, why does it appear that I can give my dynamic text fields two different names?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 11:49pm UTC](https://forum.kirupa.com/t/on-rollover-and-on-rollout/26643/2 "2003-07-24T23:49:24Z")

</div>

You forgot the quotes. Be sure display is the variable name of your textfield, not the instance name.[AS]on (rollOver) {  
\_root.display = “Home”;  
}  
on (rollOut) {  
\_root.display = “Click a Button”;  
}[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 11:56pm UTC](https://forum.kirupa.com/t/on-rollover-and-on-rollout/26643/3 "2003-07-24T23:56:03Z")

</div>

shoot me in the face dude… that’s how I originally had it, based off my limited knowledge of C++… but then I didn’t have display as my variable name, I only had it it as my instance. So I made it my varible name but then took out my quotes.

_sigh_ thanks 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 11:59pm UTC](https://forum.kirupa.com/t/on-rollover-and-on-rollout/26643/4 "2003-07-24T23:59:26Z")

</div>

No problem 🙂
