# Help with switch case

**URL:** <https://forum.kirupa.com/t/help-with-switch-case/173097>\
**Category:** Uncategorized\
**Created:** [December 21, 2005, 6:27am UTC](https://forum.kirupa.com/t/help-with-switch-case/173097 "2005-12-21T06:27:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixeldude](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pixeldude](https://forum.kirupa.com/u/pixeldude)\
**Post date:** [December 21, 2005, 6:27am UTC](https://forum.kirupa.com/t/help-with-switch-case/173097/1 "2005-12-21T06:27:30Z")

</div>

Hello…

Okay here I just having problem with passing the parameter to the switch () case…  
Okay I pass the parameter from my combobox…  
okay here my code so far …really need help with this…what’s wrong with my code…

```auto

function fontType(j){
//okay her when I trace j is show correct..but when it pass to the switch case its getting weird...it still detect "deafult"
	//trace(j);
	switch (j) {
  		case 1:
    		trace ("case 1 tested true");
    		break;
  		case 2:
    		trace ("case 2 tested true");
    		break;
  		case 3:
    		trace ("case 3 tested true");
    		break;
  		default:
    		trace ("no case tested true")
	}
}

```

any help would be appreaciate…tq
