# Player move with command

**URL:** https://forum.kirupa.com/t/player-move-with-command/277498
**Category:** flash
**Created:** [December 12, 2008, 5:22pm UTC](https://forum.kirupa.com/t/player-move-with-command/277498 "2008-12-12T17:22:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![smkirupa](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@smkirupa](https://forum.kirupa.com/u/smkirupa)
#### Post date: [December 12, 2008, 5:22pm UTC](https://forum.kirupa.com/t/player-move-with-command/277498/1 "2008-12-12T17:22:39Z")

</div>

Currently on my page, I have:

- a circle with the instance name “player”
- a square with the instance name “box”
- an input textbox with the instance name “command”
- two rectangles forming a wall, each with the instance name “wall”

What I want to do is make the player move to the box when the words “go to box” are typed into the command textbox. I also need the player to walk along the shortest route, while also avoiding any obstacles (basically just the wall).

Could someone help me out?
