# Buttons - play MC outro

**URL:** <https://forum.kirupa.com/t/buttons-play-mc-outro/54252>\
**Category:** flash\
**Created:** [June 12, 2004, 12:24pm UTC](https://forum.kirupa.com/t/buttons-play-mc-outro/54252 "2004-06-12T12:24:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmyDor](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@AmyDor](https://forum.kirupa.com/u/AmyDor)\
**Post date:** [June 12, 2004, 12:24pm UTC](https://forum.kirupa.com/t/buttons-play-mc-outro/54252/1 "2004-06-12T12:24:17Z")

</div>

:puzzled:

Please Help. Thanks to your help (Scotty and Kirupa) I am so close to having a finished fla. The last item…

How can I get the swf’s “outro” to play before the new swf loads when a button is clicked?  
(Each swf has an intro and outro at the same place on their timelines - Line 50) :puzzled:

Here is the code…

buttons\_array = [“b1”, “b2”, “b3”, “b4”];  
//movies to load  
movies\_array = [“content0.swf”, “content1.swf”, “content2.swf”, “content3.swf”];  
function activeButton() {  
for (var i in buttons\_array) {  
var ref = this.\_parent[buttons\_array\*];  
if (ref == this) {  
holder.loadMovie(movies\_array\*);  
ref.f = “active state”;  
//added disabling  
ref.enabled = false;  
} else {  
ref.f = “normal state”;  
//added enabling  
ref.enabled = true;  
}  
//changed the gotoAndPlay\>\>gotoAndStop  
ref.gotoAndStop(ref.f);  
}  
}  
for (var i in buttons\_array) {  
this[buttons\_array\*].f = “normal state”;  
this[buttons\_array\*].onPress = activeButton;  
this[buttons\_array\*].onRollOver = function() {  
this.gotoAndPlay(“over state”);  
};  
this[buttons\_array\*].onRollOut = function() {  
this.gotoAndPlay(“out state”);  
};

}
