# What and Where would the correct code be?

**URL:** <https://forum.kirupa.com/t/what-and-where-would-the-correct-code-be/130918>\
**Category:** Uncategorized\
**Created:** [December 9, 2004, 8:23pm UTC](https://forum.kirupa.com/t/what-and-where-would-the-correct-code-be/130918 "2004-12-09T20:23:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikeymoves](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@mikeymoves](https://forum.kirupa.com/u/mikeymoves)\
**Post date:** [December 9, 2004, 8:23pm UTC](https://forum.kirupa.com/t/what-and-where-would-the-correct-code-be/130918/1 "2004-12-09T20:23:09Z")

</div>

I have a movie that has 7 buttons in the main timeline. Each button calls an individual SWF. That works fine. I have transitions between each movie and they work fine. I have the buttons set up through AS in the main timeline. I placed this code in the frame with the buttons:

The movie clips load in the “section” area. They work fine. Now, when b2 is released, an external swf file (directors.swf) come us with a sub menu. If I take this same exact code, and apply it to the “directors.swf” timeline with different instance names and different swf files, shouldn’t that work?  
Is there something else I need to correct? I posted the FLA files after the code. Thanks!

b1.onRelease = function() {  
if (\_root.section != “bluesign.swf”) {  
\_root.section = “bluesign.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
\_root.gotoAndPlay(“home”);  
}  
};  
b2.onRelease = function() {  
if (\_root.section != “directors.swf”) {  
\_root.section = “directors.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
\_root.gotoAndPlay(“dir”);  
}  
};  
b3.onRelease = function() {  
if (\_root.section != “reps.swf”) {  
\_root.section = “reps.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
\_root.gotoAndPlay(“reps”);  
}  
};  
b4.onRelease = function() {  
if (\_root.section != “clients.swf”) {  
\_root.section = “clients.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
\_root.gotoAndPlay(“client”);  
}  
};  
b5.onRelease = function() {  
if (\_root.section != “staff.swf”) {  
\_root.section = “staff.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
\_root.gotoAndPlay(“staff”);  
}  
};  
b6.onRelease = function() {  
if (\_root.section != “offices.swf”) {  
\_root.section = “offices.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
\_root.gotoAndPlay(“office”);  
}  
};  
b7.onRelease = function() {  
if (\_root.section != “news.swf”) {  
\_root.section = “news.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
\_root.gotoAndPlay(“news”);  
}  
};

[http://www.zoomazooma.com/test/dir\_menu.fla](http://www.zoomazooma.com/test/dir_menu.fla)  
[http://www.zoomazooma.com/test/main.fla](http://www.zoomazooma.com/test/main.fla)
