AS3 load/unload event problems

Hi to everyone!

I hope someone can give me some pointers or even better help me out with some code that I’ve been learning. Im pretty new to AS3 and have been messing around quite a bit with flash and After Effects integration.

My problem is understanding the load/unload event. What I have at the moment is a test file I am using to help me understand the code better. There is one button that loads an external swf (carnival.swf). This seems to work ok as far as i can tell, although I think the way I have hidden the button once the SWF loads is wrong…anyway…

…what I would like to do is this. On the carnival.swf there would be a “back to main page” button that would simply remove the carnival.swf from the stage and reactivate the button on the main swf, which in the future would have other buttons that would load other swf’s on to the stage.

If anyone could help me out with this that would be great! If anyone could explain it to me that would be even better. I am a n00b though so I would need it explained in baby terms! :slight_smile:

I cant attach the files as they’re over the limit but if I would be happy to mail them to anyone that is kind enough to help.

many thanks in advance for any help