Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   Ребят,срочный хелп (https://forum.antichat.xyz/showthread.php?t=151832)

Savedracon 28.10.2009 15:07

Ребят,срочный хелп
 
Написал скрипт.Отражается почему - то только в осле.
С меня плюсик =)
<html>
<head>
<meta http-equiv="Выберите расширение для паковки" content="text/html; charset=windows-1251" />
<title>Г</title>

</head>

<body onload=blurtext()>
<center>

<SCRIPT LANGUAGE="JavaScript">
<!--

var thissize=12
var textfont="Verdana"

var textcolor= new Array()
textcolor[0]="EEEEEE"
textcolor[1]="DDDDDD"
textcolor[2]="CCCCCC"
textcolor[3]="AAAAAA"
textcolor[4]="888888"
textcolor[5]="666666"
textcolor[6]="555555"
textcolor[7]="444444"
textcolor[8]="333333"
textcolor[9]="222222"
textcolor[10]="111111"
textcolor[11]="000000"

var message = new Array()
message[0]="Gaudeamus igitur..."
message[1]="Итак, будем веселиться..."

var i_blurstrength=50
var i_message=0
var i_textcolor=0

function blurtext() {
if(document.all) {
if (i_blurstrength >=-2) {
if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
blurthis.innerHTML="<span id='blurpit1'

style='position:absolute;visibility:visible;top:5p x;left:100px;filter:blur(add=0,strength="+i_blurst rength+",dir

ection=90);font-family:"+textfont+";font-size:"+thissize+"pt;color:"+textcolor[i_textcolor]+"'>"+message[i_messa

ge]+"</span>";
document.close()
i_blurstrength=i_blurstrength-2
i_textcolor++
var timer=setTimeout("blurtext()",100)
}

else {
if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
blurthis.innerHTML="<span id='blurit1'

style='position:absolute;visibility:visible;top:5p x;left:100px;filter:blendTrans(duration=4.2);font-family:"+tex

tfont+";font-size:"+thissize+"pt;color:black'>"+message[i_message]+"</span>";
i_message++
if (i_message>=message.length){i_message=0}

i_blurstrength=20
i_textcolor=0
clearTimeout(timer)
var timer=setTimeout("blurtext()",300)
}
}
}

// - End of JavaScript - -->
</SCRIPT>




<p id=blurthis style="VISIBILITY: visible; POSITION: absolute"></p>
</center>

</body>
</html>

Byte_ 28.10.2009 15:53

с тебя много плюсиков! весь мозг съел пока додумался. =)
Цитата:

function blurtext() {
if(document.all) {
if (i_blurstrength >=-2) {...
document.all это помоему только ie'шная штука.
замени document.all на true и всё будет работать =)
Код:

<html>
<head>
<meta http-equiv="Выберите расширение для паковки" content="text/html; charset=windows-1251" />
<title>Г</title>

</head>

<body onload=blurtext()>
<center>

<SCRIPT LANGUAGE="JavaScript">
<!--

var thissize=12
var textfont="Verdana"

var textcolor= new Array()
textcolor[0]="EEEEEE"
textcolor[1]="DDDDDD"
textcolor[2]="CCCCCC"
textcolor[3]="AAAAAA"
textcolor[4]="888888"
textcolor[5]="666666"
textcolor[6]="555555"
textcolor[7]="444444"
textcolor[8]="333333"
textcolor[9]="222222"
textcolor[10]="111111"
textcolor[11]="000000"

var message = new Array()
message[0]="Gaudeamus igitur..."
message[1]="Итак, будем веселиться..."

var i_blurstrength=50
var i_message=0
var i_textcolor=0

function blurtext() {
if(true) {
if (i_blurstrength >=-2) {
if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
blurthis.innerHTML="<span id='blurpit1' style='position:absolute;visibility:visible;top:5p x;left:100px;filter:blur(add=0,strength="+i_blurstrength+",direction=90);font-family:"+textfont+";font-size:"+thissize+"pt;color:"+textcolor[i_textcolor]+"'>"+message[i_message]+"</span>";
document.close()
i_blurstrength=i_blurstrength-2
i_textcolor++
var timer=setTimeout("blurtext()",100)
}

else {
if (i_textcolor >=textcolor.length-1) {i_textcolor=textcolor.length-1}
blurthis.innerHTML="<span id='blurit1' style='position:absolute;visibility:visible;top:5p x;left:100px;filter:blendTrans(duration=4.2);font-family:"+textfont+";font-size:"+thissize+"pt;color:black'>"+message[i_message]+"</span>";
i_message++
if (i_message>=message.length){i_message=0}

i_blurstrength=20
i_textcolor=0
clearTimeout(timer)
var timer=setTimeout("blurtext()",300)
}
}
}

// - End of JavaScript - -->
</SCRIPT>




<p id=blurthis style="VISIBILITY: visible; POSITION: absolute"></p>
</center>

</body>
</html>

ЗЫ: только так красиво вышло только в ie... в остальных просто плавно исчезает и появляется.

Savedracon 28.10.2009 16:26

Пасиб =)


Время: 20:41