# More redundant code help

**URL:** https://forum.kirupa.com/t/more-redundant-code-help/170284
**Category:** jobs
**Created:** [November 24, 2005, 11:18am UTC](https://forum.kirupa.com/t/more-redundant-code-help/170284 "2005-11-24T11:18:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![flash\_noob1](https://avatars.discourse-cdn.com/v4/letter/f/8e7dd6/32.png) [@flash\_noob1](https://forum.kirupa.com/u/flash_noob1)
#### Post date: [November 24, 2005, 11:18am UTC](https://forum.kirupa.com/t/more-redundant-code-help/170284/1 "2005-11-24T11:18:56Z")

</div>

Can someone slim this code down for me? Its too fat and its gonna get fatter.

I wanted to be able to do alot of different things based on the variable thats being used. (\_root.courseMode)

I need to add a few more items in the future.

Ill offer $10.00 to the first person who posts a working answer.

Ill get back to you ASAP tonight, today being thanks giving and all.

function exit\_the\_course\_button\_yes() {  
if (\_root.courseMode == “cdRomSingle”) {  
fscommand(“quit”);  
} else if (\_root.courseMode == “cdRomCombo”) {  
loadMovieNum(“splash\_screen.swf”, 0);  
} else if (\_root.courseMode == “internetSingle”) {  
getURL(“[http://www.passged.com/login1.php](http://www.passged.com/login1.php)”, “\_self”);  
} else if (\_root.courseMode == “internetCombo”) {  
loadMovie(“splash\_screen.swf”, “\_root”);  
}  
}

Thanks!

-T
