In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: minimalcomps example

MinimalCompsおためし
Get Adobe Flash player
by naoto5959 13 Aug 2009
/**
 * Copyright naoto5959 ( http://wonderfl.net/user/naoto5959 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/dDKP
 */

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;
			
			addEventListener(Event.ENTER_FRAME, function(event:Event):void
			{
				progressBar.value += 1;
				if (progressBar.value == progressBar.maximum)
					progressBar.value = 0;
			});
		}
	}	
}