# How to tell when YouTube video is finsihed

**URL:** <https://forum.kirupa.com/t/how-to-tell-when-youtube-video-is-finsihed/265545>\
**Category:** Uncategorized\
**Created:** [July 10, 2008, 4:08am UTC](https://forum.kirupa.com/t/how-to-tell-when-youtube-video-is-finsihed/265545 "2008-07-10T04:08:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stumped](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@stumped](https://forum.kirupa.com/u/stumped)\
**Post date:** [July 10, 2008, 4:08am UTC](https://forum.kirupa.com/t/how-to-tell-when-youtube-video-is-finsihed/265545/1 "2008-07-10T04:08:32Z")

</div>

I am able to put a YouTube video into a flash page. My flash movie is only two frames. Frame 1 is a button which will move the movie to frame 2 where the youtube video plays. The following is the code to put the youtube video into the movie.

this.createEmptyMovieClip(“video\_mc”, 10000); this.video\_mc.loadMovie(“[http://www.youtube.com/v/6uh4OS1lFUI&hl=en&fs=1&autoplay=1](http://www.youtube.com/v/6uh4OS1lFUI&hl=en&fs=1&autoplay=1)”);

What I would like to do is unload the youtube video and move the movie back to frame 1 when the youtube video is finished. But I do not know how to tell when the youtube video is finished. I was thinking that using \_currentframe would be a way of telling. Any help would be greatly appreciated.

Thanks … Michael
