assuming coins are also in the _root, try changing
PHP Code:
if (_root.player_mc.hitTest(this)) 
to
PHP Code:
if ((Math.abs(_root.player_mc._x this._x) < 100) && _root.player_mc.hitTest(this))