# Container with Slide Out Menu

**URL:** https://forum.kirupa.com/t/container-with-slide-out-menu/280875
**Category:** flash
**Created:** [February 2, 2009, 2:27pm UTC](https://forum.kirupa.com/t/container-with-slide-out-menu/280875 "2009-02-02T14:27:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![M2J](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@M2J](https://forum.kirupa.com/u/M2J)
#### Post date: [February 2, 2009, 2:27pm UTC](https://forum.kirupa.com/t/container-with-slide-out-menu/280875/1 "2009-02-02T14:27:20Z")

</div>

Hello All,

I’m new to AS, and I’m having a bit of trouble.

I am currently working on a website that requires fade-in and fade-out of each page. In order to do this, I used the “Transitions Between External SWFs” tutorial here: [http://www.kirupa.com/developer/mx2004/transitions2.htm](http://www.kirupa.com/developer/mx2004/transitions2.htm)

And the slide-out menu I am using was built using this tutorial: [http://www.republicofcode.com/tutorials/flash/slidingmenu/3.php](http://www.republicofcode.com/tutorials/flash/slidingmenu/3.php)

On the slide-out menu tutorial, buttons are activated on the main timeline through an action layer using the code:

```auto

menu_mc.my1_btn.onRelease = function(){
    images_mc.gotoAndStop(1);
    }

```

Whereas on the kirupa transitions tutorial, buttons are activated with actionscript for each button using the code:

```auto

on (release) {

if (_root.currMovie == undefined) {

_root.currMovie = "main";
container.loadMovie("main.swf");
} else if (_root.currMovie != "main") {
if (container._currentframe >= container.midframe) {

_root.currMovie = "main";
container.play();

}

}

}

```

I have tried accessing the individual buttons, in the Movie Clip used for the slide-out menu, to put in the code directly above but it does not work.

How can I get the buttons to work on the slide out menu? Is there a way to put the second code posted above into the action-layer, rather than for each individual button?

Your help would be greatly appreciated.

Thanks so much,  
M2J
