47./*********************************/
[javascript]view plaincopyprint?
1./***********建立淡出的圆
**************************/
2.function circle1()
3.{
4.if(count>9.0)
5. clearInterval(in_ID3);
6. count=count+1.0;
7.var gradient = cxt.createRadialGradient(rx,ry,0,rx,ry,rr);
8. gradient.addColorStop(count/10.0, style1);
9. gradient.addColorStop(1-count/10.0, style2);
10. cxt.beginPath();
11. cxt.fillStyle=gradient;
12.//cxt.fillStyle="red";
13. cxt.arc(rx,ry,rr,0,Math.PI*2,true);
14. cxt.closePath();
15. cxt.fill();
16.}
17.function draw_circle(x,y,r,style11,style12,flag)
18.{
19. count=0.0;
20. rx=x; ry=y; style1=style11;style2=style12; rr=r;
21. in_ID3=setInterval("circle1()",50);
[javascript]view plaincopyprint?
1.}