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

ブラジャーのカップ簡易計算機

ブラジャーのカップ簡易計算機

Base64の画像埋め込みをやりたかったのと、
昔懐かしのFLASH「伺かバスト占いの歌」を発見してしまったがために
勢いで作ってみました。
(これを知っているかどうかが年代の分水嶺的な)

すいません、なんか馬鹿なことをやってみたかったんです・・・。

あくまで目安ですので、差が9.9とかでもAAに認定されます。
あくまで参考までに、ということで。
実際は付けないと、どれが合うかというのは解らないものだそうな。

バストが好きな人は、これを機会に
ブラジャーについて学んでみるのもいいんじゃないかと
思います。女性の気持ちが少し解るかも解らないかも。
興味がある人は調べてみて、女性に思いをはせてみましょう。
変態になるか、女性の味方になるかはあなた次第。

最後に一言。
「女の人を胸で判断することはよくないことですよ」
(伺かバスト占いの歌)
Get Adobe Flash player
by Hiiragi 05 May 2009
package 
{
	/*
	 * ブラジャーのカップ簡易計算機
	 * 
	 * Base64の画像埋め込みをやりたかったのと、
	 * 昔懐かしのFLASH「伺かバスト占いの歌」を発見してしまったがために
	 * 勢いで作ってみました。
	 * (これを知っているかどうかが年代の分水嶺的な)
	 * 
	 * すいません、なんか馬鹿なことをやってみたかったんです・・・。
	 * 
	 * あくまで目安ですので、差が9.9とかでもAAに認定されます。
	 * あくまで参考までに、ということで。
	 * 実際は付けないと、どれが合うかというのは解らないものだそうな。
	 * 
	 * バストが好きな人は、これを機会に
	 * ブラジャーについて学んでみるのもいいんじゃないかと
	 * 思います。女性の気持ちが少し解るかも解らないかも。
	 * 興味がある人は調べてみて、女性に思いをはせてみましょう。
	 * 変態になるか、女性の味方になるかはあなた次第。
	 * 
	 * 最後に一言。
	 * 「女の人を胸で判断することはよくないことですよ」
	 * (伺かバスト占いの歌)
	 * 
	 */
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.FontStyle;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFieldType;
	import flash.text.TextFormatAlign;
	import flash.display.Loader;
	
	[SWF(width = 465 , height = 465, frameRate = 30, backgroundColor = 0xFFFFFF)]
	
	public class Main extends Sprite 
	{
		private var cupArray:Array = ["AA", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q","R","S","T","U","V","W","X","Y","Z"];
		
		private var txt1:TextField = new TextField();
		private var txt2:TextField = new TextField();
		private var resultTxt:TextField = new TextField();
		private var errorTxt:TextField = new TextField();
		private var inputTxt1:TextField = new TextField();
		private var inputTxt2:TextField = new TextField();
		
		private var slider1Min:Number = 62.5;
		private var slider1Max:Number = 130;
		private var slider2Min:Number = 62.5;
		private var slider2Max:Number = 130;
		
		private var slider1:slider = new slider(400, 20, slider1Max, slider1Min, stage);
		private var slider2:slider = new slider(400, 20, slider2Max, slider2Min, stage);
		

		
		private var btn:Sprite = new Sprite();
		

		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			//backgroundImage
			var base64Str:String = "iVBORw0KGgoAAAANSUhEUgAAAdEAAADgCAMAAABrTKwVAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAwUExURXBwcCEhIfX19fv7+9zc3NPT08jIyIiIiKWlpU9PT+rq6ubm5u7u7uHh4QAAAP///162SdIAACOOSURBVHja7F2JgqsqDJVVQdT//9ubBFBAtNppO8uF+16ni6BwyEJISLe08rdK14agIdpKQ7SVhmgrDdFWGqIN0VYaoq00RFtpiLbSEG2IttIQbaUh2kpDtJWGaEO0lf8a0cEsTD+4pjdPNi4dvf6YQXtfZ/uZ4R/H5uH7EO1mfHY9a3PeVtfJuToMwzzrB3fo6Q7MfT8BvLezZqbShb8wcea0sK8imjeHT9KZoXIV3cj0mh08JXwv4fFmC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rKpfJPgAEAHyk7rKH+r9AAAAAASUVORK5CYII=";
			var display:Loader = base64Loader.load(base64Str);
			display.y = 150;
			if (display != null) addChild(display);
			
			
			txt1.defaultTextFormat = new TextFormat(null, 20, 0x555555, FontStyle.BOLD);
			txt1.x = 5;
			txt1.y = 0;
			txt1.text = "TopBust :";
			txt1.autoSize = TextFieldAutoSize.LEFT;
			txt1.selectable = false;
			addChild(txt1);
			
			txt2.defaultTextFormat = new TextFormat(null, 20, 0x555555, FontStyle.BOLD);
			txt2.x = 5;
			txt2.y = 65;
			txt2.text = "UnderBust : ";
			txt2.autoSize = TextFieldAutoSize.LEFT;
			txt2.selectable = false;
			addChild(txt2);
			
			resultTxt.x = 0;
			resultTxt.y = 400;
			resultTxt.width = 465;
			resultTxt.height = 60;
			resultTxt.defaultTextFormat = new TextFormat(null, 35, 0x555555, FontStyle.BOLD, null, null, null, null, TextFormatAlign.RIGHT);
			addChild(resultTxt);
			
			errorTxt.defaultTextFormat = new TextFormat(null, 15, 0xFF0000, null, null, null, null, null, TextFormatAlign.RIGHT);
			//errorTxt.text = "(error text)";
			errorTxt.x = 0;
			errorTxt.y = 380;
			errorTxt.width = 465;
			errorTxt.height = 50;
			addChild(errorTxt);

			addChild(slider1);
			slider1.addEventListener(slider.SLIDE, calc);
			slider1.x = 40;
			slider1.y = 30;
			
			addChild(slider2);
			slider2.addEventListener(slider.SLIDE, calc);
			slider2.x = 40;
			slider2.y = 90;
			
			slider1.position = 84;
			slider2.scalePosition = .1;
			
			calc();
		}

		private function calc(e:Event = null):void {
			txt1.text = "TopBust : " + slider1.position;
			txt2.text = "UnderBust : " + slider2.position;
			
			if (slider1.position > slider2.position) {
				var topBust:Number = slider1.position;
				var underBust:Number = slider2.position;
				
				var diff:Number = topBust - underBust - 7.5;
				if (diff < 0) diff = 0;
				
				var index:uint = Math.floor(diff / 2.5);
				if (index < cupArray.length) {
					var size:String = cupArray[index] + Math.floor((underBust + 2.5) / 5) * 5;
					resultTxt.text = "var fitSize:BustCup = " + size + ";";
					errorTxt.text = "";
				} else {
				resultTxt.text = "Error";
				errorTxt.text = "Zカップより上は設定してないんで、エラーにしておきます。";
				}
			} else {
				resultTxt.text = "Error";
				errorTxt.text = "いや、アンダーがトップを超える・・・それはないんじゃないかな・・・";
			}
		}
		
	}
	
}


//http://wonderfl.kayac.com/code/3803bdc5868d2a66bd81b7228053ea60b34f0a06
//をかなり参考にしました。というかそのままです。

import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer; 
import flash.display.Loader; 
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.utils.ByteArray; 
import mx.utils.Base64Decoder; 

internal class base64Loader {
	
	
	public static function load(data:String):Loader {
		
		var byteArray:ByteArray; 
        var decorder:Base64Decoder = new Base64Decoder();
        var loader:Loader = new Loader;
		
		decorder.decode(data);
		
		try {
			byteArray = decorder.toByteArray();
			byteArray.position = 0; 
		} catch(e:Error) {
			return null;
		}
		
		loader.loadBytes(byteArray);
		
		return loader;
	}
	
}


//sliderクラス。もうちょっと汎用的にしたい。
//あとグラフィックも、もうちょっと凝りたい。

import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;

internal class slider extends Sprite {
	
	public static const SLIDE:String = "slide";
	
	private var _drag:Boolean = false;
	private var _rollOverFlag:Boolean = false;
	
	private var _w:Number;
	private var _h:Number;
	
	private var _position:Number;
	private var _scalePosition:Number;
	private var _positionMax:Number;
	private var _positionMin:Number;
	
	private	var sliderA:Sprite = new Sprite();
	private var sliderB:Sprite = new Sprite();
	private var toolTip:Sprite = new Sprite();
	private var toolTipBG:Sprite = new Sprite();
	private var toolTipTxt:TextField = new TextField();
	
	public function slider(w:Number, h:Number, max:Number, min:Number, dObj:DisplayObject) {
		_w = w;
		_h = h;
		_positionMax = max;
		_positionMin = min;
		
		//スライダーの溝を描画
		sliderA.graphics.lineStyle(2, 0x555555);
		sliderA.graphics.moveTo(0, _h / 2);
		sliderA.graphics.lineTo(_w, _h / 2);
		
		addChild(sliderA);
		
		//パラメータの最大値最小値を書いておく
		var txt1:TextField = new TextField();
		txt1.defaultTextFormat = new TextFormat(null, null, 0xAAAAAA);
		txt1.text = _positionMax.toString();
		txt1.autoSize = TextFieldAutoSize.LEFT;
		txt1.selectable = false;
		txt1.x = _w - txt1.width / 2;
		txt1.y = _h / 2;
		addChild(txt1);
		
		var txt2:TextField = new TextField();
		txt2.defaultTextFormat = new TextFormat(null, null, 0xAAAAAA);
		txt2.text = _positionMin.toString();
		txt2.autoSize = TextFieldAutoSize.LEFT;
		txt2.selectable = false;
		txt2.x = -txt1.width / 2;
		txt2.y = _h / 2;
		addChild(txt2);
		
		//スライダーのツマミを描画
		sliderB.graphics.beginFill(0x000000);
		sliderB.graphics.drawRoundRect(-5, 0, 10, h, 5);
		sliderB.graphics.endFill();
		sliderB.buttonMode = true;
		
		addChild(sliderB);
		
		//ツールチップを描画
		var tf:TextFormat = new TextFormat();
		tf.color = 0xFFFFFF;
		tf.leftMargin = 5;
		tf.rightMargin = 5;
		toolTipTxt.defaultTextFormat = tf;
		toolTipTxt.autoSize = TextFieldAutoSize.LEFT;
		toolTipTxt.selectable = false;

		
		toolTip.addChild(toolTipBG);
		toolTip.addChild(toolTipTxt);
		addChild(toolTip);
		toolTip.visible = false;
		
		//addEventListener
		sliderB.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDownHandler);
		dObj.addEventListener(MouseEvent.MOUSE_UP, onMouseUpHandler);
		dObj.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMoveHandler);
		sliderB.addEventListener(MouseEvent.MOUSE_OVER, onMouseOverHandler);
		sliderB.addEventListener(MouseEvent.MOUSE_OUT, onMouseOutHandler);
		
		_scalePosition = this.scalePosition;
		_position = this.position;
	}
	
	private function onMouseMoveHandler(e:MouseEvent = null):void 
	{

		
		if (_drag) {
			_scalePosition = this.scalePosition;
			_position = this.position;
			dispatchEvent(new Event(SLIDE));
		}
		
		if (_rollOverFlag) showPosition(new Point(e.stageX, e.stageY));
	}
	
	private function onMouseDownHandler(e:MouseEvent):void 
	{
		_drag = true;
		e.target.startDrag(false,new Rectangle(0,0,_w,0));
	}
	
	private function onMouseUpHandler(e:MouseEvent):void 
	{
		_drag = false;
		_rollOverFlag = false;
		toolTip.visible = false;
		sliderB.stopDrag();
	}
	
	private function onMouseOverHandler(e:MouseEvent):void 
	{
		_rollOverFlag = true;
		toolTip.visible = true;
		
		showPosition(new Point(e.stageX, e.stageY));
	}
	
	private function showPosition(arg1:Point):void 
	{
		var pt:Point = globalToLocal(arg1);
		
		toolTip.x = pt.x + 15;
		toolTip.y = pt.y;
		
		toolTipTxt.text = "value = " + _position;
		toolTipBG.graphics.clear();
		toolTipBG.graphics.beginFill(0x000000, .5);
		toolTipBG.graphics.drawRoundRect(0, -5, toolTipTxt.width, toolTipTxt.height+10, 10);
		toolTipBG.graphics.endFill();
	}
	
	private function onMouseOutHandler(e:MouseEvent):void 
	{
		if (!_drag) {
			_rollOverFlag = false;
			toolTip.visible = false;
		}

	}
	

	
	
	
	
	//get/set
	public function get position():Number {
		_scalePosition = this.scalePosition;
		return (_positionMax - _positionMin) * _scalePosition + _positionMin;
	}
	
	public function set position(pos:Number):void {
		_position = pos;
		_scalePosition = (_position - _positionMin) / (_positionMax - _positionMin);
		sliderB.x = _w * _scalePosition;
	}
	
	public function get scalePosition():Number {
		_scalePosition = sliderB.x / _w;
		return _scalePosition;
	}
	
	public function set scalePosition(posScale:Number):void {
		_scalePosition = posScale;
		_position = (_positionMax - _positionMin) * _scalePosition + _positionMin;
		sliderB.x = _w * _scalePosition;
	}

	
}