# Problem with large if else statement

**URL:** <https://forum.kirupa.com/t/problem-with-large-if-else-statement/175682>\
**Category:** Uncategorized\
**Created:** [January 17, 2006, 12:01am UTC](https://forum.kirupa.com/t/problem-with-large-if-else-statement/175682 "2006-01-17T00:01:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![combinecreative](https://avatars.discourse-cdn.com/v4/letter/c/6bbea6/32.png) [@combinecreative](https://forum.kirupa.com/u/combinecreative)\
**Post date:** [January 17, 2006, 12:01am UTC](https://forum.kirupa.com/t/problem-with-large-if-else-statement/175682/1 "2006-01-17T00:01:29Z")

</div>

Hi I can’t figure out what’s wrong with these if/else statements… I’m pretty new to actionscript, so it’s probably simple but I just don’t know it…

I’m trying to categorize selections.

If they choose “newsad, billboard, flyer, etc”, then the category is “print”.  
if they choose “website, emailblast, interactivecd, etc”, then the category is “multimedia”.

and so on and so on.

The problem is that it’s assigning any selection I make to the last category in the set of if statements…

```auto

if (_root.project == "newsad" || "magazinead" || "flyer" || "poster" || "brochure" || "folder" || "directmail" || "billboard" || "banner" || "busbench" || "transitsignage" || "calendar" || "presskit" || "invitation") {
    _root.projectSection = "4print";
} else if (_root.project == "tv" || "radio" || "infomercial") {
    _root.projectSection = "4broadcast";
} else if (_root.project == "photoshoot" || "cdduplication" || "mediabuy" || "strategy" || "research" || "collectfiles" || "projecttimeestimate" || "mailingservices" || "pressrelease" || "eventcoordination") {
    _root.projectSection = "4services";
} else if (_root.project == "campaignconcept" || "logo" || "tagline" || "businesscard" || "envelopes" || "letterhead") {
    _root.projectSection = "4creative";
} else if (_root.project == "website" || "emailblast" || "powerpoint" || "interactivecd" || "video") {
    _root.projectSection = "4multimedia";
}

```

Any help would be appreciated!
