# Var troubles

**URL:** <https://forum.kirupa.com/t/var-troubles/167207>\
**Category:** Uncategorized\
**Created:** [October 26, 2005, 8:36am UTC](https://forum.kirupa.com/t/var-troubles/167207 "2005-10-26T08:36:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kritikal](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kritikal/32/1699_2.png) [@kritikal](https://forum.kirupa.com/u/kritikal)\
**Post date:** [October 26, 2005, 8:36am UTC](https://forum.kirupa.com/t/var-troubles/167207/1 "2005-10-26T08:36:34Z")

</div>

hey guys,

well I have a frame that has a variable named language and it’s value will depend on the button clicked.

```auto

var language:String;

enterBtn.onRelease = function() {
    language = "eng";
    gotoAndPlay(14);
}

```

now on frame 23 I have

```auto

stop();

_root.container.unloadMovie("swf/splash.swf");

if (language == fr) {    
    trace("selected language is french");
    _root.container.loadMovie("swf/aboutFr.swf");
}
else if (language == eng) {
    trace("selected language is english");
    _root.container.loadMovie("swf/aboutEng.swf");
    
}    
trace(language);

```

my problem is that no matter what the language is it won’t go in any of the if statements, nothing gets traced except the last trace which tells me what language has been selected and that works perfectly.

I can’t seem to find the problem, can someone please help me out
