forked from: forked from: minimalcomps example
MinimalCompsおためし
/**
* Copyright naoto5959 ( http://wonderfl.net/user/naoto5959 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/oNoa
*/
// forked from naoto5959's forked from: minimalcomps example
package
{
import com.bit101.components.*;
import flash.display.Sprite;
import flash.events.Event;
/**
* MinimalCompsおためし
*/
public class MinimalComps extends Sprite
{
//----------------------------------------------------------------------
// properties
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// methods
//----------------------------------------------------------------------
//------------------------------
// public methods
//------------------------------
/**
* constructor
*/
public function MinimalComps()
{
var panel:Panel = new Panel(this, stage.stageWidth / 4, stage.stageHeight / 8);
panel.setSize(stage.stageWidth / 2, stage.stageHeight * 3 / 4);
var checkBox:CheckBox = new CheckBox(panel, 20, 20);
checkBox.label = "Check it out!";
var label:Label = new Label(panel, 20, 40);
label.text = "This is a label";
var pushbutton:PushButton = new PushButton(panel, 20, 60);
pushbutton.label = "Push Me!っす";// 全角は無視されるよ
pushbutton.width = 100;
var hSlider:HSlider = new HSlider(panel, 20, 90);
var vSlider:VSlider = new VSlider(panel, 130, 20);
var inputText:InputText = new InputText(panel, 20, 110);
inputText.text = "Input Text";
var progressBar:ProgressBar
progressBar = new ProgressBar(panel, 20, 140);
progressBar.maximum = 100;
progressBar.value = 0;
var radio1:RadioButton = new RadioButton(panel, 20, 160);
radio1.label = "Choice 1";
var radio2:RadioButton = new RadioButton(panel, 20, 180);
radio2.label = "Choice 2";
var radio3:RadioButton = new RadioButton(panel, 20, 200);
radio3.label = "Choice 3";
var colorchooser:ColorChooser = new ColorChooser(panel, 20, 230);
colorchooser.value = 0xff0000;
// colorchooser.usePopup = true; // r24から対応のプロパティ。wonderflのversionでは未対応
addEventListener(Event.ENTER_FRAME, function(event:Event):void
{
progressBar.value += 1;
if (progressBar.value == progressBar.maximum)
progressBar.value = 0;
});
}
}
}