AS签名等一些常用AS代码

//显示时间
function get_time() {
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填充,并获得填充区点阵
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;
}——————————————————————
//我的AS签名
//取得填充区,并将信息存入fill_data(“1”需要表示填充,“0”表示无须填充)
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";
//数据预处理
jh_data=jh_data.split(",");
for(var i in jh_data){
jh_data[i]=jh_data[i].split("");
}
this.createEmptyMovieClip("jh7086", 1000000);
jh7086.onRelease=function(){
getURL("http://www.webjx.com";,_blank’" target="_blank" >http://www.webjx.com",_blank);
}
jh7086.onEnterFrame=function(){
this.clear();
this.lineStyle();
this.beginFill(0);
this.moveTo(0,0);
this.lineTo(110,0);
this.lineTo(110,32);
this.lineTo(0,32);
this.lineTo(0,0);
this.endFill();
//填字
for(var i=0 ;i<jh_data.length;i++){
for(var j=0 ;j<jh_data[i].length;j++){
if(jh_data[i][j]=="1"){
var col=random(150)+50;
this.lineStyle(2,(col+50)*256*256+col*256+100,100);
this.moveTo(i+4,j+3);
this.lineTo(i+4.5,j+3);
}
}
}
}
}
_jh7086() ;//执行这个函数就得到偶的签名

时间: 2024-11-08 18:18:30

AS签名等一些常用AS代码的相关文章

操作 SQL Server Mobile 2005 数据库的常用 C# 代码

server|sql|数据|数据库 整理几段操作 SQL Server Mobile 数据库的常用 C# 代码,供刚刚接触 SQL Server Mobile 开发的朋友参考. 1. 创建数据库// 创建数据库File.Delete("Test.sdf");SqlCeEngine engine = new SqlCeEngine(    "Data Source='Test.sdf';LCID=1033;Password=\"s$;2'!dS64\";En

ASP编程常用的代码

 ASP编程常用的代码 -------------------------------------------------------------------------------- 1. ASP与Access数据库连接: <%  dim conn,mdbfile  mdbfile=server.mappath("数据库名称.mdb")  set conn=server.createobject("adodb.connection")  conn.open

md5-android 获取 签名证书的MD5的代码?

问题描述 android 获取 签名证书的MD5的代码? 如题,求助,获取android应用程序apk的签名证书*.keystore中MD5的android代码 解决方案 通过NDK来调用openssl库 解决方案二: 通过NDK来调用openssl库

Android开发常用经典代码段集锦_Android

本文实例总结了Android开发常用经典代码段.分享给大家供大家参考,具体如下: 1.图片旋转 Bitmap bitmapOrg = BitmapFactory.decodeResource(this.getContext().getResources(), R.drawable.moon); Matrix matrix = new Matrix(); matrix.postRotate(-90);//旋转的角度 Bitmap resizedBitmap = Bitmap.createBitma

ASP.NET程序中常用编程代码

ASP.NET程序中常用编程代码 1.为按钮添加确认对话框 Button1.Attributes.Add("onclick","return confirm('确认?')");button.attributes.add("onclick","if(confirm('are you sure...?')){return true;}else{return false;}") 2.删除表格选定记录 //获得DataGrid主键in

Java 方法签名详解及实例代码_java

java 方法签名,我想做java 开发的朋友也知道,方法签名的重要性,是方法重载的一个比较好的解释,尤其是在后续优化方面,这里记录下,有看到的朋友也可看下, 方法签名的意义 对于同名不同类.同类不同名的方法,方法签名的意义并不是很大,但是对于重载方法来说,方法签名的意义就十分巨大了.由于重载方法之间的方法名是相同的,那么我们势必要从构成方法的其他几个要素中找到另一个要素与方法名组成能够唯一标示方法的签名,方法体当然不予考虑.那么就是形参列表和返回值了,但是由于对于调用方法的人来说,方法的形参数

36个Android开发常用经典代码大全_Android

本文汇集36个Android开发常用经典代码片段,包括拨打电话.发送短信.唤醒屏幕并解锁.是否有网络连接.动态显示或者是隐藏软键盘等,希望对您有所帮助. //36个Android开发常用代码片段 //拨打电话 public static void call(Context context, String phoneNumber) { context.startActivity( new Intent(Intent.ACTION_CALL, Uri.parse( "tel:" + pho

web前端开发JQuery常用实例代码片段(50个)_jquery

本文给大家展示50个jquery代码片段,这些代码能够给你的javascript项目提供帮助.其中的一些代码段是从jQuery1.4.2才开始支持的做法,另一些则是真正有用的函数或方法,他们能够帮助你又快又好地把事情完成.这些都是我尽量记住的有着最佳性能的代码段,因此如果你发现你任何可以做得更好的地方的话,欢迎把你的版本粘贴在评论中!我希望你在这一文章中能找到有帮助的东西. 1. 如何创建嵌套的过滤器 //允许你减少集合中的匹配元素的过滤器, //只剩下那些与给定的选择器匹配的部分.在这种情况下

常用jQuery代码分享_jquery

1.查看浏览器信息 navigator.userAgent 检索浏览器信息包括哪些字符 例如: if (navigator.userAgent.toLowerCase().indexOf("htc") >= 0) { $("#GuanKa .page_content").css("transform", "scale(0.92)"); $(".gaunka_pic").css("top&qu