# Why are my variables behaving weird?

**URL:** <https://forum.kirupa.com/t/why-are-my-variables-behaving-weird/214490>\
**Category:** Uncategorized\
**Created:** [January 29, 2007, 3:03pm UTC](https://forum.kirupa.com/t/why-are-my-variables-behaving-weird/214490 "2007-01-29T15:03:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoo\_buffalo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zoo_buffalo/32/2467_2.png) [@zoo\_buffalo](https://forum.kirupa.com/u/zoo_buffalo)\
**Post date:** [January 29, 2007, 3:03pm UTC](https://forum.kirupa.com/t/why-are-my-variables-behaving-weird/214490/1 "2007-01-29T15:03:06Z")

</div>

hi guys  
just run into a problem with my variable use - i am using the variable ‘page’ to let flash know which page of the website the user is viewing, and therefore which quote should be displayed when the user mouses over something. i am saying…

```auto
if (_root.page == home) {
    this.tag.gotoAndStop("quote1");
}
if (_root.page == contact) {
    this.tag.gotoAndStop("quote6");

```

(i have tried loosing the \_root.'s before the variables, no different) - what i get is that the quote displayed is always quote6, even though i have defined the var ‘page’ as home on the home page. i did trying making this an if/else statement - what happened then was that the quote displayed was always quote1! i’m stumped… so if anyone can help i’d be very happy - here’s the .fla…  
[http://myweb.tiscali.co.uk/murderkins/gv/gv04.fla](http://myweb.tiscali.co.uk/murderkins/gv/gv04.fla)  
(the code is within the tagline at the bottom, which changes into the quote when the user mouses over either the line of red text or the name next to it)  
thanks!!  
emma.
