AS签名等一些常用AS代码
2008-04-02 11:06:04来源:互联网 阅读 ()
//显示时间
var a = this.createEmptyMovieClip("time_show", 200412);
a.createTextField("time_text", 0, 0, 0, 140, 18);
a.time_text.background=true;
a.onEnterFrame = function () {
this.time_text.text = new Date().getFullYear() "年" new Date().getMonth() "月" new Date().getDay() "日" new Date().getHours() ":" new Date().getMinutes() ":" new Date().getSeconds();
};
}
get_time();
――――――――――――――――――――――――――
//显示帧速
function get_fps() {
var a = this.createEmptyMovieClip("fps_show", 100000);
a.createTextField("fps_text", 0, 0, 0, 16, 18);
a.fps_text.background = true;
a._fps = 0;
a.oldtim = getTimer();
a.onEnterFrame = function () {
this._fps = Math.round(1000 / (getTimer() - this.oldtim));
this.oldtim = getTimer();
this.fps_text.text = this._fps;
};
}
get_fps();
//AS填充,并获得填充区点阵
var s_j=mc._x;
var e_j=mc._x mc._width;
var s_i=mc._y;
var e_i=mc._y mc._height;
//
var a=mc.createEmptyMovieClip("fill",1);
var fill_data=[];
for(var i=0;i<100;i ){
fill_data[i]=[];
for(var j=0;j<25;j ){
if(mc.hitTest(i,j,true)){
a.lineStyle(1,random(0xffffff));
a.moveTo(i,j);
a.lineTo(i .5,j);
fill_data[i][j]=1;
}else{
fill_data[i][j]=0;
}
}
}
for(var i in fill_data){
fill_data[i]=fill_data[i].join("");
}
fill_data=fill_data.join(",");
trace(fill_data);
return fill_data;
}
//我的AS签名
function get_fill(mc){
var s_j=mc._x;
var e_j=mc._x mc._width;
var s_i=mc._y;
var e_i=mc._y mc._height;
//
var a=mc.createEmptyMovieClip("fill",1);
var fill_data=[];
for(var i=0;i<100;i ){
fill_data[i]=[];
for(var j=0;j<25;j ){
if(mc.hitTest(i,j,true)){
a.lineStyle(1,random(0xffffff));
a.moveTo(i,j);
a.lineTo(i .5,j);
fill_data[i][j]=1;
}else{
fill_data[i][j]=0;
}
}
}
for(var i in fill_data){
fill_data[i]=fill_data[i].join("");
}
fill_data=fill_data.join(",");
trace(fill_data);
return fill_data;
}
下面的jh_data就是由函数get_fill(mc)取得的,mc中是被打散的字符,注册点位于左上角
//我的签名
function _jh7086() {
var jh_data="0000000000000000000000000, 0000000001100000000000000,0000000001100000000000000, 0000000001100000000001000,0011000001111111111111100, 0011111001111111111111100,0000110000000000000111000, 0000000000000000001110000,0000110000000000011100000, 0000110000000000000000011,0000110000011100011000111, 0000110000111000011100110,0000110011101000111001110, 0000111111001000110001100,0110110100001001100001100, 0111110000001111000111000,0111010000001110000110000, 0000110000111100011110000,0000110011110000111110000, 0000110011100011111111000,0000110001000111100011000, 0000110000000110000011100,0000110000000100000001110, 0000110000000000000000110,0000000000000000000000000, 0000000000000000000000000,0000000000000000000000000, 0000000000000000000000000,0000001111111111111111110, 0000001111111111111111110,0000001000000000000000000, 0110000000000000000000000,0111100000000000001000000, 0011100000000000011100000,0000000000000000110000000, 0000000000000011100000000,0000000000001110000000000, 0011001111111000000000000,0011001111111000000000000, 0011001000011100000000000,0011000000001110000000000,0011000000000111000000000, 0011000000000011110000000,0011000000000001111000000, 0011000000000000010000010,0011000000000000000000111, 0011000000000000000000110,0011111111111111111111110, 0011111111111111111111100,0000000000000000000000000, 0000000000000000000000000,0000000000000000000000000, 0000000000000000000000000,0000010000000000000001000, 0000010001101110001111000,0000010001111110011100000, 0000010001000110011000010,0000010001000110000000011, 0110010001000111111111111,0111010001000111111111111, 0011010001000110000000000,0000010001000110000000000, 0000010001111110111000000,0000010000000000001100110, 0000010000000000000001110,0000000010000000000111100, 0000000010000000011110000,0111111111111111111000000, 0111111111111000000000000,0100000010000000000000000, 0000000011111111111111100,0001000011111111111111110, 0011100010000000000000110,0000110010000000000000110, 0000010010000000000011110,0000000010000000000011100, 0000000000000000000000000,0000000000000000000000000, 0000000000000000000000000,0000000000000000000000000, 0000001110000000000001110,0000001111111111111111110, 0000001000000000000000000,0110000000000000000000000, 0111100000000000001000000,0011110000000000011100000, 0000100000000000111000000,0000000000000011100000000, 0000000000001110000000000,0011001111111000000000000, 0011001111111000000000000,0011001000011100000000000, 0011000000001110000000000,0011000000000111000000000, 0011000000000011110000000,0011000000000001111000000, 0011000000000000010000010,0011000000000000000000111, 0011000000000000000000110, 0011111111111111111111110";
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
上一篇: Flash
下一篇: 用FlashMX制作“登录界面”
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash