# Listener and restart movie

**URL:** <https://forum.kirupa.com/t/listener-and-restart-movie/259035>\
**Category:** flash\
**Created:** [April 30, 2008, 3:48pm UTC](https://forum.kirupa.com/t/listener-and-restart-movie/259035 "2008-04-30T15:48:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garbourne](https://avatars.discourse-cdn.com/v4/letter/g/b19c9b/32.png) [@Garbourne](https://forum.kirupa.com/u/Garbourne)\
**Post date:** [April 30, 2008, 3:48pm UTC](https://forum.kirupa.com/t/listener-and-restart-movie/259035/1 "2008-04-30T15:48:36Z")

</div>

Hi guys,

I know a little AS but AS3 is seriously blowing my mind (anybody know of any good books with tutorials for AS3, general basics etc?)

Anyway, my problem is Im making a dance game that consists of 3 movies; intro movie (where you pick a character), and then a BOY and GIRL movie that loads up depending on if you select male or female as your character. This all works fine - but what I need is a listener on my start movie that knows when you have clicked “play again” on the loaded movie - and when this button is pressed the BOY or GIRL movie is unloaded and the main intro movie restarts.

Code in Intro (that loads the external movie for GIRL):

var request:URLRequest = new URLRequest(“girlDance.swf”);  
var loader:Loader = new Loader();  
loader.load(request);  
addChild(loader);

Then there is a button instance named “again\_but” on the final frame of the girlDance.swf

So i need a line that will listen for this button being pressed and unload the girlDance.swf and reset the playhead to frame 1

Any help would be greatly appreciated… I may have waffled and make no sense! Failing this a line of code that will refresh the IE browser when “again\_but” is pressed would be fine!

Gaz
