48、围绕一点旋转的文字

48、围绕一点旋转的文字

<HTML><HEAD><TITLE>网页特效--围绕一点旋转的文字效果</TITLE>

<META content="text/html; charset=gb2312" http-equiv=Content-Type></HEAD>

<BODY onload=initiate() text="#FF0000">

<CENTER>

<SCRIPT>

<!--

 

var message = new Array()

message[0]="欢迎光临网页特效!"

message[1]="怎么样,有什么感觉?"

message[2]="是不是感觉比较酷呢?:)"

message[3]="请记住本站的网址!"

 

// 旋转信息的宽与高

var scrollerheight=200

var scrollerwidth=700

 

// 字体

var font_family="宋体"

 

// 文本的位置

var x_textposition=300

var y_textposition=100

 

var i_message=0

var i_loop=0

var max_loop=48

var timer

y_textposition=y_textposition-Math.floor(scrollerheight/1.5)+10

x_textposition=x_textposition-Math.floor(scrollerwidth/3)

 

function initiate() {

       if (document.all) {       

              document.all.rotationstyle.style.posLeft=x_textposition

              document.all.rotationstyle.style.posTop=y_textposition

        changemessage()

       }

}

 

function changemessage() {

              do_rotate="yes"

              rotationstyle.innerHTML=

              '<OBJECT ID="rotationobj" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+

        '<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+

        '<PARAM NAME="Line0002" VALUE="SetLineColor(ff,00,00)">'+

              '<PARAM NAME="Line0003" VALUE="SetFillColor(ff,00,00)">'+

              '<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+5+', 400, 0, 0, 0)">'+

              '<PARAM NAME="Line0005" VALUE="Text(\''+message[i_message]+'\', 0, 0, 0)">'+

              '</OBJECT>'        

              startscroll()

}

 

function startscroll() {

       if (i_loop < max_loop) {

        rotationobj.Rotate(0,0,-30)

              rotationobj.Scale(1.04,1.04,1.04)

              i_loop++

              timer=setTimeout("startscroll()",50)

       }

   else {

        i_message++

              i_loop=0

        if (i_message>=message.length) {i_message=0}

              timer=setTimeout("changemessage()",2000)

       }

}

 

// -->

</SCRIPT>

<SPAN id=rotationstyle style="POSITION: absolute">

<OBJECT classid=CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6

id=rotationobj></OBJECT></SPAN>

</BODY></HTML>

 

Write a comment

Comments: 0