All pastes #33272 Raw Edit

stefan flash

public text v1 · immutable
#33272 ·published 2005-12-11 11:53 UTC
rendered paste body
MovieClip.prototype.krissel = function(ziel, laenge) {
	if (!this.running) {
		this.running = true;
		var temp = ziel.text;
		var x = 0;
		var y = 0;
		this.onEnterFrame = function() {
			++x<laenge ? ziel.text="" : (y++, ziel.text=temp.substr(0, y));
			while (ziel.text.length != temp.length) {
				ziel.text += chr(random(26)+65);
			}
			if (ziel.text == temp) {
				delete this.onEnterFrame;
				this.running = false;
			}
		};
	}
};
//
var btn_text = ["HOME", "NEWS", "KONTAKT", "IMPRESSUM"];
var btn_link = ["http://www.google.de", "newscenter", "kontaktdaten", "blubbb"];
for (var i = 0; i<4; i++) {
    var btn = this.attachMovie("btn", "btn"+i, i, {_y:i*40});
    var my_fmt:TextFormat = new TextFormat();
	this.my_fmt.bold = true;
	this.my_fmt.font = "Helvetica";
	this.my_fmt.size = 40;
	this.btn.txt.setNewTextFormat(my_fmt);
	this.btn.txt.autoSize = true;
	btn.txt.text = btn_text[i];
    btn.i = i
    btn.onRollOver = function() {
        this.krissel(this.txt, 20);
    };
    btn.onRollOut = btn.onDragOut=function() {
        this.txt.text = btn_text[this.i]
        delete this.onEnterFrame
        this.running = false;
    };
	btn.onRelease = function() {
		this.txt.text = btn_text[this.i]
	        _root.attachMovie ("symbol2", "symbol2", 9298)
		this.running = false;
};
}