[AS3]Object sticking to floor

I'm trying to make a platformer with Box2d in Flash. When the player object drops down onto the floor it will frequently get stuck in it and can only get out by jumping.

Use the right and left arrows to move and up to jump.

http://www.swfcabin.com/open/1277515344

The MBGame class is the document class, the Player class controls the player, and the Solid class controls the floors. Any help would be appreciated.

Code:
package
{
   import flash.events.Event;
   import flash.events.KeyboardEvent;
   import flash.display.MovieClip;
   import flash.ui.Keyboard;
   import Box2D.Dynamics.*
   import Box2D.Collision.*
   import Box2D.Collision.Shapes.*
   import Box2D.Dynamics.Joints.*
   import Box2D.Dynamics.Contacts.*
   import Box2D.Common.Math.*
   /**
    * ...
    * @author Aaron MacDonald
    */
   public class MBGame extends MovieClip
   {
      public static const box_to_flash:Number = 0.1;
      public static var m_world:b2World;
      public static var solids:Array;
      public var m_velocityIterations:int = 10;
      public var m_positionIterations:int = 10;
      public var m_timeStep:Number = 1.0 / 60.0;
      public var player:Player;
      
      public function MBGame()
      {
         
         stage.addEventListener(KeyboardEvent.KEY_DOWN, reportKeyDown);
         
         player = new Player(500, 500);   
         addChild(player);   
         initBox2d();
         //var mysolid:Solid  = new Solid(275, 300);
         //addChild(mysolid);
         
      }
      
      private function initBox2d():void
      {   


         // Define the gravity vector
         var gravity:b2Vec2 = new b2Vec2(0.0, MBGame.box_to_flash * 200);
         
         // Allow bodies to sleep
         var doSleep:Boolean = true;
         
         // Construct a world object
         m_world = new b2World( gravity, doSleep);
         for (var i:int = 0; i < solids.length; i++) {
            solids[i].init();
         }
         stage.addEventListener(Event.ENTER_FRAME, Update, false, 0, true);
         player.init();

      }
      
      private function reportKeyDown(event:KeyboardEvent):void
      {
         if (event.keyCode == Keyboard.RIGHT) player.body.SetLinearVelocity(new b2Vec2(MBGame.box_to_flash * 150, player.body.GetLinearVelocity().y));
         if (event.keyCode == Keyboard.LEFT) player.body.SetLinearVelocity(new b2Vec2(MBGame.box_to_flash * - 150, player.body.GetLinearVelocity().y));
         if (event.keyCode == Keyboard.UP) player.body.ApplyImpulse(new b2Vec2(0, -1000), player.body.GetWorldCenter());
         //if (event.keyCode == Keyboard.DOWN) player.y += 10;
      }
      
      public function Update(e:Event):void
      {
         //trace(player.body.GetPosition().y);
         m_world.Step(m_timeStep, m_velocityIterations, m_positionIterations);
         
         // Go through body list and update sprite positions/rotations
         for (var bb:b2Body = m_world.GetBodyList(); bb; bb = bb.GetNext()){
            if (bb.GetUserData() is MovieClip && bb.GetUserData() is Player){
               var movieClip:MovieClip = bb.GetUserData() as MovieClip;
               //trace(movieClip.x);
               movieClip.x = bb.GetPosition().x / MBGame.box_to_flash;
               movieClip.y = bb.GetPosition().y / MBGame.box_to_flash;
               movieClip.rotation = bb.GetAngle() * (180 / Math.PI);
               trace(bb.IsActive());
            
            }
         }
         
      }
      
      
   }

}


Code:
package
{
   import Box2D.Dynamics.*;
   import Box2D.Collision.*;
   import Box2D.Collision.Shapes.*;
   import Box2D.Common.Math.*;
   import flash.display.DisplayObjectContainer;
   import flash.display.MovieClip;
   import flash.geom.Point;
      import flash.events.Event;
   /**
    * ...
    * @author Aaron MacDonald
    */
   public class Player extends MovieClip
   {
      private var bd:b2BodyDef;
      public var body:b2Body;
      
      public function Player(x:int, y:int)
      {   
         
         
      }
      
      public function init():void
      {
         this.x = 500;
         this.y = 100;
         var boxShape:b2PolygonShape = new b2PolygonShape();
         boxShape.SetAsBox(this.width / 2 * MBGame.box_to_flash, this.height / 2 * MBGame.box_to_flash);
         
         var fixtureDef:b2FixtureDef = new b2FixtureDef();
         fixtureDef.shape = boxShape;
         fixtureDef.density = 1.1;
         fixtureDef.friction = 0.5;
         fixtureDef.restitution = 0.0;
         
         bd = new b2BodyDef();
         bd.type = b2Body.b2_dynamicBody;
         body = MBGame.m_world.CreateBody(bd);
         body.CreateFixture(fixtureDef);
         body.SetUserData(this);
         body.SetFixedRotation(true);
         this.x = x;
         this.y = y;
         var start:b2Vec2 = new b2Vec2(this.x * MBGame.box_to_flash, this.y * MBGame.box_to_flash);
         body.SetPosition(start);
      }
   }

}


Code:
package
{
   import Box2D.Dynamics.*;
   import Box2D.Collision.*;
   import Box2D.Collision.Shapes.*;
   import Box2D.Common.Math.*;
   import flash.display.DisplayObjectContainer;
   import flash.display.MovieClip;
   import flash.events.Event;
   import flash.geom.Point;
   /**
    * ...
    * @author Aaron MacDonald
    */
   public class Solid extends MovieClip
   {
      private var bd:b2BodyDef;
      private var body:b2Body;
      
      public function Solid():void
      {   
         if (MBGame.solids)
            MBGame.solids.push(this);
         else
         {
            MBGame.solids = new Array();
            MBGame.solids.push(this);
         }
         
      }
      public function init():void
      {
         var boxShape:b2PolygonShape = new b2PolygonShape();
         boxShape.SetAsBox(this.width/2 * MBGame.box_to_flash, this.height/2 * MBGame.box_to_flash);
         
         var fixtureDef:b2FixtureDef = new b2FixtureDef();
         fixtureDef.shape = boxShape;
         fixtureDef.density = 0;
         fixtureDef.friction = 0.5;
         fixtureDef.restitution = 0.0;
         
         bd = new b2BodyDef();
         bd.type = b2Body.b2_staticBody;;
         body = MBGame.m_world.CreateBody(bd);
         body.CreateFixture(fixtureDef);
         body.SetUserData(this);
         
         
         var start:b2Vec2 = new b2Vec2(this.x * MBGame.box_to_flash, this.y * MBGame.box_to_flash);
         body.SetPosition(start);
      }
   }

}
Please read the FAQ on tile based games: http://code.google.com/p/box2d/wiki/FAQ
Thanks, I tried a circle for the player collision shape and it works fine.

Original thread: https://box2d.org/forum/viewtopic.php?t=5173