# simpleButtons dissapearing

**URL:** <https://forum.kirupa.com/t/simplebuttons-dissapearing/294762>\
**Category:** flash\
**Created:** [August 19, 2009, 3:12pm UTC](https://forum.kirupa.com/t/simplebuttons-dissapearing/294762 "2009-08-19T15:12:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![acebuddy29](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@acebuddy29](https://forum.kirupa.com/u/acebuddy29)\
**Post date:** [August 19, 2009, 3:12pm UTC](https://forum.kirupa.com/t/simplebuttons-dissapearing/294762/1 "2009-08-19T15:12:05Z")

</div>

here is my code

```auto

//game_display_bitmapData is an object which contains bitmap data. this bitmap data is loaded from an XML file.

var option_button:SimpleButton=create_a_button("grunge_button",50,360);
var about_button:SimpleButton=create_a_button("grunge_button",170,360);

function create_a_button(_string:String,_x:Number , _y:Number)
{
    var button:SimpleButton = new SimpleButton();
    button.name=_string
    button.upState=game_display_bitmapData[_string+"_up"]; //game_display_bitmapData is an object which contains bitmap data.
    button.overState=game_display_bitmapData[_string+"_over"];
    button.downState=game_display_bitmapData[_string+"_down"];
    button.hitTestState=button.upState;
    button.x = _x
    button.y = _y
    return button;
}

addChild(option_button);
addChild(about_button);

```

Now what happens is tht only one button is visible or workin at any point of time. But if i use say, “xyz\_button” as the params for the about\_button. then it works fine. i can see both the buttons.  
also i tried giving unique names to the button, even that didnt work. why is this happening?
