All pastes #84881 Raw Edit

Mine

public text v1 · immutable
·published 2006-07-11 13:01 UTC
rendered paste body
class Test {

	static var app:Test;
	public var myFormat:TextFormat;

	function Test() {
		this.drawButton('button');
	}

	function drawButton(title:String) {
		_root.createEmptyMovieClip('square',_root.nextHighestDepth());
		// kuutio
		with(_root.square)
		{
        		beginFill(0x000088);
        		moveTo(0,0);
        		lineTo(100,0);
        		lineTo(100,20);
        		lineTo(0,20);
        		endFill();		
		}

		_root.square.onRollOver = function(){
			this._alpha = 50;
		}
		_root.square.onRollOut = function(){
			this._alpha = 100;
		}
		// teksti
		_root.square.createTextField("tf",0,0,0,100,20);
		
		myFormat = new TextFormat();
		myFormat.align = "center";
		myFormat.font = "Arial";
		myFormat.color = 0xFFFFFF;

		_root.square.tf.text = title;
		_root.square.tf.setTextFormat(myFormat);
	}

	// entry point
	static function main(mc):Void {
		app = new Test();
	}

}