ProblemsWith A Switch

this line

trace(collisionsArray2*.object2);

returns: [object BounceLefts] and [object BounceUps] respectively but the switch doesn’t return its traces

i’ve also tried without the quotes

case BounceUps:



var collisionsArray2:Array=collisions2.checkCollisions();
                    
                    for (var i:uint=0; i<collisionsArray2.length; i++)
                        {
                            trace("collision2Hit");
                            trace(collisionsArray2*.object2);
                                switch (collisionsArray2*.object2)
                                    {
                                    case "BounceUps" :
                                        {
                                            ship.yVel *=-1;
                                            ship.rVel=90;
                                            ship.xVel-=ship.xVel*.25;
                                            ship.y-=1;
                                            if(Math.abs(ship.xVel)<.25)

                                                {
                                                    ship.xVel=0
                                                }
                                            if(Math.abs(ship.yVel)<.25)
                                                {
                                                    ship.gravity=0;
                                                    ship.yVel=0;
                                                }
                                            if(Math.abs(ship.yVel)>.25)

                                            {
                                                ship.gravity=-.020
                                            }
                        
                                            trace("UPS");
                                        }
                                             
             
                                            break;
                                        case "BounceLefts" :
                                    trace ("Lefts!!!");
                                            break;
//                                        
                                    }
                            }