# Variables and if

**URL:** <https://forum.kirupa.com/t/variables-and-if/211367>\
**Category:** Uncategorized\
**Created:** [December 30, 2006, 6:36pm UTC](https://forum.kirupa.com/t/variables-and-if/211367 "2006-12-30T18:36:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takashy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/takashy/32/1985_2.png) [@Takashy](https://forum.kirupa.com/u/Takashy)\
**Post date:** [December 30, 2006, 6:36pm UTC](https://forum.kirupa.com/t/variables-and-if/211367/1 "2006-12-30T18:36:18Z")

</div>

this may sound maybe easy, but I cant figure it out myself… lol

Anyay, I created a new frame and added the following code to it…

if (X=0) {  
gotoAndStop(3);  
}

now, the problem…

actualy I wanted it to be so that when it playes this frame it goes to frame 3 if X is 0. And X is 0. But it does not go to frame 3.

I kinda wanted to make it so that… If X=0 go to frame 3 , if X=1 go to frame 4 and so on… 😕

I remember that there was something like onEnterFrame or so but that didnt help and I cant remember anything else… lol(maybe because I don’t know really much about flash)

Do anyone knows how I could “fix” that?

Thank you
