On rollover and on rollout

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

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?

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]

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 :slight_smile:

No problem :slight_smile: