html5金山打字游戏源码_金山打字游戏网页版

hacker|
217

文章目录:

flash 仿“金山打字通之打地鼠”(打字游戏) 源码

个简单的Flash打字游戏

上一篇 / 下一篇 2007-09-25 16:42:03

查看( 142 ) / 评论( 3 ) / 评分( 5 / 0 )

代码:

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

打字游戏 ——V1.0

日期:2007-9-24

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

定义变量

----------------------------------------------------------------------------------------------

*/

fscommand("fullscreen", true);

var Bring_num:Number = 0;

var Bring_maxnum:Number = 20;

var Grade_num:Number = 1;

var Grade_bring:Number = 100;

var Move_speed:Number = 2;

var Bring_speed:Number = 0;

var Press_num:Number = 0;

var Right_num:Number = 0;

var Loss_num:Number = 0;

var Grade_boolean:Boolean = false;

var Interval_num:Number = 0;

var Listener:Object = new Object();

var Addsound:Sound = new Sound();

var Addblast_mc:Object = new Object();

var Time_m:Number = 0;

var Time_s:Number = 1;

var Hide_id:Number;

/*

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Bring_word函数功能:随机产生字符

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

*/

function Bring_word() {

var color_array:Array = new Array(0xffffff, 0x9B4A8B, 0xE0C0DB, 0xAC285E, 0x235CB1, 0x379D37, 0xB1A323);

var txtstyle:TextFormat = new TextFormat();

txtstyle.bold = true;

txtstyle.font = "宋体";

txtstyle.size = 20;

txtstyle.color = color_array[random(7)];

_root.Bring_num++;

if (_root.Bring_num=Bring_maxnum) {

_root.Bring_num = 0;

}

switch (random(2)) {

case 0 :

txt = random(26)+97;

break;

case 1 :

txt = random(10)+48;

break;

}

_root.createTextField("txt"+_root.Bring_num, _root.Bring_num, random(Stage.width), -(random(200)+10), 25, 25);

this["txt"+_root.Bring_num].text = chr(txt);

this["txt"+_root.Bring_num].setTextFormat(txtstyle);

}

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Interval_event();初始化时产生的字符个数

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

*/

function Interval_event() {

Bring_word();

Interval_num++;

if (Interval_num=3) {

clearInterval(Interval_id);

}

}

var Interval_id:Number = setInterval(Interval_event, 1000);

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

cyc_event下落函数

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

*/

function cyc_event() {

function _event() {

for (var i = 0; i=Bring_maxnum; i++) {

var n:Number = random(2) ? -Math.random()*9 : Math.random()*9;

_root["txt"+i]._y += Move_speed;

_root["txt"+i]._x += n;

if (_root["txt"+i]._yStage.height) {

_root["txt"+i].removeTextField();

Bring_word();

Loss_num++;

loss_txt.text = Loss_num;

}

}

}

var cyc_id:Number = setInterval(_event, 50);

}

cyc_event();

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

监听键盘

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

*/

Key.addListener(Listener);

Listener.onKeyDown = function() {

Press_num++;

//trace(Press_num);

if (Grade_boolean) {

Grade_num++;

Grade_boolean = false;

grade_txt.text = "第"+Grade_num+"关";

Move_speed += 2;

for (var i = 0; i3; i++) {

Bring_word();

}

}

//trace("Press_num="+Press_num);

for (i=0; i=Bring_maxnum; i++) {

if (_root["txt"+i].text == chr(Key.getAscii())) {

Right_num++;

Addsound.attachSound("Sound_mc");

Addsound.start();

//_root.attachMovie("Blast_mc", "Addblast_mc", _root.getNextHighestDepth(), {_x:_root["txt"+i]._x, _y:_root["txt"+i]._y});

Blast_mc.play();

Blast_mc._x = _root["txt"+i]._x;

Blast_mc._y = _root["txt"+i]._y;

_root["txt"+i].removeTextField();

Bring_word();

if (Right_num=Grade_bring and Right_num%Grade_bring == 0) {

Grade_boolean = true;

} else {

Grade_boolean = false;

}

}

}

right_txt.text = String(Right_num);

if (Press_num-Right_num0) {

wrong_txt.text = String(Press_num-Right_num);

} else {

Press_num += Math.abs(Press_num-Right_num);

}

};

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5

时间函数

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5

*/

function Time_event() {

Time_s++;

if (Time_s/601) {

Time_m++;

Time_s = 1;

}

time_txt.text = Time_m+":"+Time_s%60;

}

setInterval(Time_event, 1000);

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

简介函数

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

*/

var newmenu:ContextMenu = new ContextMenu();

newmenu.hideBuiltInItems();

this.menu = newmenu;

newmenu.customItems.push(new ContextMenuItem("作者:Edward.yang", by_event));

newmenu.customItems.push(new ContextMenuItem("QQ:77839683", getqq));

newmenu.customItems.push(new ContextMenuItem("退出", exit_event, true));

function exit_event() {

fscommand("quit", "");

}

function by_event() {

Hide_id = setInterval(hide_by, 5000);

by_mc.gotoAndStop(2);

by_mc._alpha = 0;

by_mc.onEnterFrame = function() {

this._alpha += (100-this._alpha)/8;

this._x += (Stage.width/2-this._x)/8;

this._y += (Stage.height/2-this._y)/8;

//trace(this._alpha);

if (this._alpha=100) {

delete by_mc.onEnterFrame;

}

};

}

function hide_by() {

by_mc.onEnterFrame = function() {

this._alpha -= 8;

//trace(this._alpha);

if (this._alpha=0) {

this.gotoAndStop(1);

clearInterval(Hide_id);

delete by_mc.onEnterFrame;

}

};

}

function getqq() {

getURL("tencent://message/?uin=77839683");

帮忙制作小脚本(金山打字生死时速

打出文章我不知道是什么意思,但是我有个方法可以给你采纳:

先看看金山的属性,估计是D:/XDF/什么的,你按照从左到右的顺序一个文件一个文件的打开,当打开到看见金山的图标后,你点上面的查询,然后搜索:great book,然后把里面的文章剪切到别的地方,在里面打上一些字(全部打1也是可以的),然后打开游戏,选great book。然后按就行了。里面的所有文章都可以这么改。

还有就是你练习开头的2-3句话,然后一开始就狂飙就行了[当小偷和滑板警察不实用,因为我全部都玩过关了,所以知道没我这个速度是不可能的。(我打的是原文)]

金山打字游戏怎么玩

软件简介: 金山打字游戏绿色版是姥姥从金山打字2006中剥离出来的打字游戏。练习打字最基础的功夫是学会键盘盲打(即不看键盘就能打字),而这款软件就是大人或细佬打字基础练习的顶好工具。 打字练习过程中游戏是提高打字兴趣和积极性必不可少的内容。金山打字游戏共设有五款游戏,字母练习是通过生动活泼的拯救苹果游戏、诙谐幽默的鼹鼠的故事、场面宏观的太空大战完成的;在妙趣横生的激流勇进中可以进行单词练习;紧张激烈的生死时速用来提高文章的打字速度。它们个个构思巧妙,趣味性强,而且操作方便,您只需点击 ,就能进入游戏,让您在妙趣横生的游戏中无形地提高您对键盘的熟悉程度和文章盲打的水平。进去下把您觉得这个答案好不

2条大神的评论

  • avatar
    访客 2022-07-01 上午 05:38:01

    5 16:42:03查看( 142 ) / 评论( 3 ) / 评分( 5 / 0 )代码:/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  • avatar
    访客 2022-07-01 上午 10:59:58

    //trace("Press_num="+Press_num);for (i=0; i=Bring_maxnum; i++) {if (_root["txt"+i].text == chr(Key.getAscii())) {Right_num++;Ad

发表评论