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.
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.