# How to show "loading" animation only when video is buffering?

**URL:** https://forum.kirupa.com/t/how-to-show-loading-animation-only-when-video-is-buffering/326057
**Category:** flash
**Created:** [November 20, 2011, 2:14pm UTC](https://forum.kirupa.com/t/how-to-show-loading-animation-only-when-video-is-buffering/326057 "2011-11-20T14:14:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Boreez](https://avatars.discourse-cdn.com/v4/letter/b/3be4f8/32.png) [@Boreez](https://forum.kirupa.com/u/Boreez)
#### Post date: [November 20, 2011, 2:14pm UTC](https://forum.kirupa.com/t/how-to-show-loading-animation-only-when-video-is-buffering/326057/1 "2011-11-20T14:14:13Z")

</div>

Hi,

I’m building a video player, and I’d like the play to show a “Loading, please wait”-type animation whenever the video is buffering and not playing. (This is either when the user enters the page and the video has to buffer a bit before it can start playing, or when the video suddenly stops midway because the internet connection can’t load video fast enough.) Is there a way to detect when this happens and show the animation accordingly?
