设置首页:
btn.onRelease{
geturl("javascript :document.body.style.behavior=\"url(#default#homepage)\";document.body.sethomepage(\http://www.51as.com \)", "_self");
}
加入收藏夹:
btn.onRelease{
geturl("javascript :window.external.addfavorite(\"http://www.51as.com\")", "_self");
}
判断输入是否为数字的函数:
btn.onRelease{
if(Number(pass)==NaN){ //判断输入是否为数字
pass="";
}
检查E-MAIL的函数:
function checkemail(email) {
var str = new String(email);
var arr_email = str.split("@");
if ((arr_email.length != 2) || (arr_email[1].indexOf(".")<1)) {
return (false);
} else {
return (true);
}
}
鼠标双击问题:
lsn_DbClick = new Object();
lsn_key = new Object();
lsn_DbClick.onMouseDown = function() {
clickTime = getTimer();
if (clickTime-lastClickTime<=300) {
trace("双击了鼠标");
}
lastClickTime = clickTime;
};
Mouse.addListener(lsn_DbClick);
time = getTimer()-down_time;
if (time<300) {
//双击后的代码部分
}
down_time = getTimer();
怎样设as,拒绝影片被人用loadMovie导入:
_root._name = "nn";
this.onEnterFrame = function() {
if (this._name != "nn" || _root.getDepth() != -16384) {
this.unloadMovie();
}
};
Copyright 2007-2008 51AS.com Extended in kingcms 鲁ICP备06001158号