# Buttons dont work flash 2.0

**URL:** <https://forum.kirupa.com/t/buttons-dont-work-flash-2-0/287574>\
**Category:** Uncategorized\
**Created:** [May 3, 2009, 10:27pm UTC](https://forum.kirupa.com/t/buttons-dont-work-flash-2-0/287574 "2009-05-03T22:27:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![frenchface](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@frenchface](https://forum.kirupa.com/u/frenchface)\
**Post date:** [May 3, 2009, 10:27pm UTC](https://forum.kirupa.com/t/buttons-dont-work-flash-2-0/287574/1 "2009-05-03T22:27:34Z")

</div>

I have just started messing around with flash. I am trying to make a very simple website, it has 4 buttons and 4 sets or text. you have home, about, camp and contact. when someone clicks on the text i want the corrent text to display. My code 2.0 :

```auto
menu = ["home", "about", "camp", "contact"];
var current = menu[0];
for (var i = 0; i<menu.length; i++) {
	var b = menu*;
	this[b+"_btn"].txt = b;
	this[b+"_btn"].onPress = function() {
		current = this.txt;
		_root.content.gotoAndPlay(this.txt)
	};
}

```

when i preview it it nows the buttons are buttons, but nothing happens when you click on them,.

Thanks in advance

**added**

my buttons are called  
about\_btn  
home\_btn  
etc  
i gave them the same instans name

the text for the buttons is in a Mc called content
