# Using Cases!

**URL:** https://forum.kirupa.com/t/using-cases/270864
**Category:** flash
**Created:** [September 15, 2008, 4:46pm UTC](https://forum.kirupa.com/t/using-cases/270864 "2008-09-15T16:46:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spooks222](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@spooks222](https://forum.kirupa.com/u/spooks222)
#### Post date: [September 15, 2008, 4:46pm UTC](https://forum.kirupa.com/t/using-cases/270864/1 "2008-09-15T16:46:44Z")

</div>

Well i noticed I had many if statements in my code. I switched to using cases, but in certain cases(no pun intended) i can’t seem to make sense of it.

I know the case numbers go from 0 - whatever. I don’t really understand how to make case statements for more than one possible variable.

I’m making a clock, and at certain times it does certain things. so I wanted to use a case for when the time is 1am - 6am but using case would I have to

```
case 1 :
case 2 : 
case 3 : 
case 4: 
case 5 :
case 6 :

```

background\_mc.gotoAndStop( 1);  
break;

is there anyway I could do case 1 through 6 ? or should I just be using an if statement?
