It's **Tales from the Neverending Story (2001)**

[IMDB][1]

You can watch the scene You just described here: 

[You Tube][2]


  [1]: https://www.imdb.com/title/tt0271308/
  [2]: https://www.youtube.com/watch?v=X3wGmZKIAMQ