# Script transition and button code won't work together

**URL:** <https://forum.kirupa.com/t/script-transition-and-button-code-wont-work-together/220371>\
**Category:** flash\
**Created:** [March 25, 2007, 7:27pm UTC](https://forum.kirupa.com/t/script-transition-and-button-code-wont-work-together/220371 "2007-03-25T19:27:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![papalazarou78](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@papalazarou78](https://forum.kirupa.com/u/papalazarou78)\
**Post date:** [March 25, 2007, 7:27pm UTC](https://forum.kirupa.com/t/script-transition-and-button-code-wont-work-together/220371/1 "2007-03-25T19:27:33Z")

</div>

Hi

I’ve been experiementing with actionscripting transitions between sections… this is the first site I have tried this with (last 3 had swf loaded in one after another rather than transitioned between). I used some code from [kirupa.com](http://kirupa.com) which works for loading movies in and out, but I also have some code for my movie buttons. I can get one or the other working, but not together, so I guess I’m clashing code somewhere, I could do with some help please to find what I’m doing wrong…

The transistion code and calling-up buttons is;

```auto

Menubar.b1.onRelease = function() {
	if (_root.section != "about.swf") {
		_root.section = "about.swf";
		_root.transition.gotoAndPlay("closing");
	}
};
Menubar.b2.onRelease = function() {
	if (_root.section != "portfolio.swf") {
		_root.section = "portfolio.swf";
		_root.transition.gotoAndPlay("closing");
	}
};
Menubar.b3.onRelease = function() {
	if (_root.section != "contact.swf") {
		_root.section = "contact.swf";
		_root.transition.gotoAndPlay("closing");
	}
};

```

and the code I have on my movie buttons is;

```auto

on (rollOver) {
	gotoAndPlay("rollover");
}
on (releaseOutside, rollOut) {
	gotoAndPlay("rollout");
}

```

Is there a way to combine them???

I have attached the fla file as well, if this helps.

Thanks. Wayne.
