02-10-2009, 14:48
|
#1
|
|
Bilgisayar Yazı Kodu
Kod:
<SCRIPT LANGUAGE = "JavaScript">
function AraVob() {
}
var ScreenLine = new AraVob();
ScreenLine[1] = " İstediğiniz metni buraya yazabilirsiniz,";
ScreenLine[2] = " İstediğiniz metni buraya yazabilirsiniz,";
ScreenLine[3] = " İstediğiniz metni buraya yazabilirsiniz";
ScreenLine[4] = " İstediğiniz metni buraya yazabilirsiniz,";
ScreenLine[5] = " ";
ScreenLine[6] = " İstediğiniz metni buraya yazabilirsiniz";
ScreenLine[7] = " İstediğiniz metni buraya yazabilirsiniz,";
ScreenLine[8] = " ";
ScreenLine[9] = " İstediğiniz metni burayayazabilirsiniz ";
ScreenLine[10] = " İstediğiniz metni buraya yazabilirsiniz,";
ScreenLine[11] = " Metin Sonu";
var msgNum = 1; // set to first message to display
var msgCnt = 11; // set to number of last ScreenLine to display.
var typeSpeed = 50; // the typing rate in milliseconds (higher number type more slowly)
var lineDelay = 2000 // the delay time at end of line. (unless the line is a single space)
var pagLen = 6; // number of lines per page (usually the number of rows in the TEXTAREA)
var delay = typeSpeed;
var timerPS = null;
var linPntr = 0;
var tally = 1;
var msg = " ";
var outMsg = "";
var i = 0;
// set up ScreenLines for display
var typingon = true;
for (x = msgCnt; 1 <= x; x--) {
ScreenLine[x+pagLen] = ScreenLine[x] + "\r\n";
}
for (x = 1; x <= (pagLen); x++) {
ScreenLine[x] = " \r\n";
}
msgCnt += pagLen;
msg = ScreenLine[1];
// end setup
function SwitchIt() {
typingon = !typingon;
}
function DisplayScroll() {
if (msgNum < pagLen) {
delay = typeSpeed;
}
else {
delay = lineDelay;
}
ChangeMsg();
outMsg += msg;
self.document.msgform.msgarea.value = outMsg;
if (typingon == true) {
timerPS = setTimeout("DisplayMsg()",delay);
}
else {
clearTimeout(timerPS);
timerPS = setTimeout("DisplayScroll()",delay);
}
}
function DisplayMsg() {
if (msg.length <= i) {
i = 0;
ChangeMsg();
}
outMsg += msg.charAt(i);
i++;
if (msg.charAt(i) != "\n" || msg == " \r\n") {
delay = typeSpeed;
}
else {
delay = lineDelay;
}
self.document.msgform.msgarea.value = outMsg;
if (typingon == false) {
timerPS = setTimeout("DisplayScroll()",delay);
}
else {
clearTimeout(timerPS);
timerPS = setTimeout("DisplayMsg()",delay);
}
}
function ChangeMsg() {
msgNum++;
if (msgCnt < msgNum) {
msgNum = 1;
}
if (pagLen <= tally) {
chgPage();
}
tally++;
msg = ScreenLine[msgNum];
}
function chgPage() {
if (msgNum < pagLen) {
linPntr = msgCnt - pagLen + msgNum + 1;
}
else {
linPntr = msgNum - (pagLen - 1);
}
outMsg = ScreenLine[linPntr];
for (p = 1; p < (pagLen - 1); p++) {
linPntr++;
if (msgCnt < linPntr) {
linPntr = 1;
}
outMsg += ScreenLine[linPntr];
}
}
function quitDisplay() {
self.document.msgform.msgarea.value = "Type a Page for yourself today!";
}
setTimeout("DisplayMsg()",1000);
</SCRIPT>
<FORM NAME = "msgform">
<TEXTAREA NAME = "msgarea" style=".formf2 {background:#FFFFFF;font-family:MS Sans serif,Tahoma,Helvetica;width:400px;height:100px;font-size:8pt;border-style:solid;border-width:1;border-color:#0099FF;color:#0000FF;">
</TEXTAREA></FORM>
|
|
|