# How to Create SimpleButton with Default View

**URL:** <https://forum.kirupa.com/t/how-to-create-simplebutton-with-default-view/332503>\
**Category:** flash\
**Created:** [July 4, 2014, 1:11pm UTC](https://forum.kirupa.com/t/how-to-create-simplebutton-with-default-view/332503 "2014-07-04T13:11:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikel](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@nikel](https://forum.kirupa.com/u/nikel)\
**Post date:** [July 4, 2014, 1:11pm UTC](https://forum.kirupa.com/t/how-to-create-simplebutton-with-default-view/332503/1 "2014-07-04T13:11:23Z")

</div>

Hi, I want to create default view SimpleButton in my class file. But when I test my movie I’m seeing that my code doesn’t show anything.

```auto
package {
    ...
    import flash.display.SimpleButton;
    public class MainGraphics extends Sprite
    {
        ...
        private var meter_btn:SimpleButton = new SimpleButton();
        public function CreateArea()
        {
            // constructor code
            this.addEventListener(Event.ADDED_TO_STAGE, init);
        }
        public function init(event:Event)
        {
            ...
            addChild( meter_btn );
            ...
        }
        ...
    }
}

```

This code shows no button and no errors. I don’t know what to set upState, overState, downState and hitTestState.

What I mean by saying default view is the view of the button when we drag a component to the library. This mustn’t be so hard. Sorry for my English.
