# Help with switch cases

**URL:** <https://forum.kirupa.com/t/help-with-switch-cases/245660>\
**Category:** flash\
**Created:** [December 2, 2007, 5:41pm UTC](https://forum.kirupa.com/t/help-with-switch-cases/245660 "2007-12-02T17:41:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASneakyGiraffe](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ASneakyGiraffe](https://forum.kirupa.com/u/ASneakyGiraffe)\
**Post date:** [December 2, 2007, 5:41pm UTC](https://forum.kirupa.com/t/help-with-switch-cases/245660/1 "2007-12-02T17:41:10Z")

</div>

alright, so im making a text adventure, and im trying to do it all on one frame with a single huge switch case.

Buuuutt, i have a problem.

i have an inputbox (userInput), a button (sendBtn), and an dynamic output field (storyText).  
In layer one, frame one, i have  
stop();  
Mouse.show();  
uinput = userInput.getText();  
sendBtn.onRelease = function(){  
switch(uinput){  
case “bob” : trace(“hello”);break;  
}

and for some reason it will never send back that trace.  
However, if i replace the switch case with an if,  
it works perfectly.

What am i doing wrong?

EDIT: scratch all that- i figured it out.
