# Switch b\*tch!

**URL:** <https://forum.kirupa.com/t/switch-b-tch/313342>\
**Category:** Uncategorized\
**Created:** [August 26, 2010, 3:18pm UTC](https://forum.kirupa.com/t/switch-b-tch/313342 "2010-08-26T15:18:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rimacy](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@rimacy](https://forum.kirupa.com/u/rimacy)\
**Post date:** [August 26, 2010, 3:18pm UTC](https://forum.kirupa.com/t/switch-b-tch/313342/1 "2010-08-26T15:18:30Z")

</div>

here’s my switch. im getting 1104: invalid xml name(and as far as i know i have no xml in there)  
and a bunch of 1084:\* errors.

any ideas out there???

```auto
public function hitTesty()
        {
            var collisions:Array = acollisionList.checkCollisions();
            
            if(collisions.length)
            {
                switch(true)
                {
                    case (ship.rotation>=315 && <=360):
                    ship.rotation=0;
                    break;
                    case (ship.rotation>=0 && <=45):
                    ship.rotation=0;
                    break;
                    case (ship.rotation>45 && <=135):
                    ship.rotation=90;
                    break;
                    case (ship.rotation>=135 && <=225):
                    ship.rotation=180;
                    break;
                    case (ship.rotation>=225 && <=315)5:
                    ship.rotation=270;
                    break;
                }
            }
                
                shipBounce1(ship,rock);
        }

```
