SimpleButtonのテスト
♥0 |
Line 32 |
Modified 2010-07-03 23:06:40 |
MIT License
archived:2017-03-20 06:53:33
ActionScript3 source code
/**
* Copyright nishink ( http://wonderfl.net/user/nishink )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/2m9B
*/
package {
import flash.text.TextField;
import flash.display.Sprite;
import flash.display.SimpleButton;
public class FlashTest extends Sprite {
public function FlashTest() {
var upstate:TextField = new TextField();
upstate.text = "ボタンアップ";
upstate.background = true;
upstate.backgroundColor = 0xFFCCCC;
var overstate:TextField = new TextField();
overstate.text = "ボタンオーバー";
overstate.background = true;
overstate.backgroundColor = 0xCCFFCC;
var downstate:TextField = new TextField();
downstate.text = "ボタンダウン";
downstate.background = true;
downstate.backgroundColor = 0xCCCCFF;
var hitstate:TextField = new TextField();
hitstate.text = "ボタンヒット";
hitstate.background = true;
hitstate.backgroundColor = 0xCCCCCC;
var button:SimpleButton =
new SimpleButton(upstate, overstate, downstate, hitstate);
button.x = 10;
button.y = 10;
button.width = 100;
button.height = 100;
addChild(button);
}
}
}