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: forked from: minimalcomps example

MinimalCompsおためし
Get Adobe Flash player
by naoto5959 02 Sep 2009
  • Forked from naoto5959's forked from: minimalcomps example
  • Diff: 3
  • Related works: 2
  • Talk

    keno42 at 20 Aug 2009 07:37
    34行目の全角はフォントがなくて無視されている?
    naoto5959 at 20 Aug 2009 09:20
    ご指摘の通り、34行目の全角はフォントがないので無視されるようです。 ちなみに、52行目のusePopupはrevision24以降でないと生えていないプロパティのようです。このforkはその確認のためでしたが、debug playerではエラーが出てしまうのでコメントアウトしました。

    Tags

    GUI
    Embed
/**
 * 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;
			});
		}
	}	
}