# SWFLoader + end of loaded movie

**URL:** <https://forum.kirupa.com/t/swfloader-end-of-loaded-movie/260863>\
**Category:** flash\
**Created:** [May 20, 2008, 3:12pm UTC](https://forum.kirupa.com/t/swfloader-end-of-loaded-movie/260863 "2008-05-20T15:12:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lone\_wolf](https://avatars.discourse-cdn.com/v4/letter/l/839c29/32.png) [@Lone\_wolf](https://forum.kirupa.com/u/Lone_wolf)\
**Post date:** [May 20, 2008, 3:12pm UTC](https://forum.kirupa.com/t/swfloader-end-of-loaded-movie/260863/1 "2008-05-20T15:12:45Z")

</div>

Greetings!

Is it possible to add and event to a SWFLoader to check if a loaded swf has stopped playing?

or is there another way to check if a loaded swf had finished playing?

thanks!

---

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [May 20, 2008, 10:16pm UTC](https://forum.kirupa.com/t/swfloader-end-of-loaded-movie/260863/2 "2008-05-20T22:16:03Z")

</div>

Loaded movie must dispatch a custom event, Flash doesn’t do that automatically.

```auto
//in last keyframe
dispatchEvent(new Event("contentHasFinishedPlaying",false,true);

```

If ur event is bubbling (like here) it can be listened even on stage.

---

<div class="post-metadata">

**Author:** ![LeventKA](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/leventka/32/2160_2.png) [@LeventKA](https://forum.kirupa.com/u/LeventKA)\
**Post date:** [July 9, 2008, 6:04pm UTC](https://forum.kirupa.com/t/swfloader-end-of-loaded-movie/260863/3 "2008-07-09T18:04:20Z")

</div>

[quote=Felixz;2328881]Loaded movie must dispatch a custom event, Flash doesn’t do that automatically.  
ActionScript Code:  
[LEFT][COLOR=#808080]_//in last keyframe_[/COLOR]  
dispatchEvent[COLOR=#000000]([/COLOR][COLOR=#000000] **new** [/COLOR] EventCOLOR=#000000[/COLOR];  
[/LEFT]

If ur event is bubbling (like here) it can be listened even on stage.[/quote]

Can u explain this with a simple example?
