论文无忧网提供:计算机毕业论文范文|计算机毕业设计|计算机毕业论文
栏目导航 教育技术学 小学教育 学前教育 代写论文
当前位置: > 教育论文 > 教育技术学 >

教学类游戏设计——计算机的使用基础

copyright paper51.com

  1        开关机部分代码

内容来自论文无忧网 www.paper51.com

ifFrameLoaded(41)  //使用 ifFrameLoaded 语句,可以用来检测,当前正在下载的 Flash 动画是否已经下载完指定的帧。参数(scene)指定检测帧的所在场景,参数(frame)指定要检测的帧,该参数设定为数字值时,表示要检测的帧号,为字符串值的时,表示要//检测帧的标签。 内容来自论文无忧网 www.paper51.com

{

http://www.paper51.com

    gotoAndPlay(3); copyright paper51.com

} // End ofifFrameLoaded

http://www.paper51.com

stop (); http://www.paper51.com

2       鼠标的认识与操作代码

内容来自论文无忧网 www.paper51.com

ifFrameLoaded(3)

copyright paper51.com

{ copyright paper51.com

    gotoAndPlay(3);

paper51.com

} // End ofifFrameLoaded 内容来自www.paper51.com

gotoAndPlay(1); 内容来自www.paper51.com

stop ();

内容来自论文无忧网 www.paper51.com

3       打字游戏部分代码

copyright paper51.com

function denji()//等级

内容来自www.paper51.com

{  

内容来自论文无忧网 www.paper51.com

grade = fgrade.selectedItem.data; copyright paper51.com

} // End of thefunction

内容来自论文无忧网 www.paper51.com

function tm()//时间 paper51.com

{   diaoyong[4] = 1;

内容来自www.paper51.com

    if (ftime.selectedItem.data!= 0)

http://www.paper51.com

    {   timer = ftime.selectedItem.data; copyright paper51.com

       _global.time4 = timer;

内容来自www.paper51.com

    }

内容来自论文无忧网 www.paper51.com

    else copyright paper51.com

    { 内容来自www.paper51.com

       choice = 4;

paper51.com

       _root.attachMovie("dingyitime", time111, 21);//自定义的时间用于第二个场景

http://www.paper51.com

       setProperty(_root.time111, _x, 648);

http://www.paper51.com

       setProperty(_root.time111, _y, 260); 内容来自论文无忧网 www.paper51.com

    } // end else if

http://www.paper51.com

} // End of thefunction http://www.paper51.com

function ks()//按键范围 copyright paper51.com

{ copyright paper51.com

    T =fkeysound.selectedItem.data;// 在有多个选中项的多选列表中,selectedItem 将返回最近选中的项。

paper51.com

} // End of thefunction http://www.paper51.com

//监听

copyright paper51.com

fgrade.addEventListener("change",denji);//等级选择监听 copyright paper51.com

farea.addEventListener("change",wq);//区域选择监听

paper51.com

ftime.addEventListener("change",tm);//时间选择监听 内容来自www.paper51.com

function screen()

paper51.com

{ 内容来自论文无忧网 www.paper51.com

 getURL("FSCommand:fullscreen",false);// 是否全屏播放,参数为true或false    http://www.paper51.com

 getURL("FSCommand:allowscale",true);// "allowscale" 是否允许通过拉伸                                             窗口缩放影片,参数为true或false

copyright paper51.com

getURL("FSCommand:showmenu", true);// "showmenu" 是否在播放器显示菜单,参数为true或false

内容来自论文无忧网 www.paper51.com

   getURL("FSCommand:trapallkeys", true);// 是否屏蔽播放器的快捷键 内容来自论文无忧网 www.paper51.com

} // End of thefunction

paper51.com

function jian(m) 内容来自www.paper51.com

{ 内容来自www.paper51.com

    j = 0; paper51.com

    for (i = NUMBER - 1; i >=0; i--)

内容来自www.paper51.com

    { 内容来自www.paper51.com

        if(a[i] == "_" + m + "_" + i)

http://www.paper51.com

        { 内容来自www.paper51.com

           removeMovieClip (a[i]); 内容来自www.paper51.com

           jianmu();

http://www.paper51.com

           a[i] = 0; paper51.com

           ++done; paper51.com

           j = 1;

内容来自www.paper51.com

           break; 内容来自论文无忧网 www.paper51.com

        } //end if

paper51.com

    } // end of for

内容来自论文无忧网 www.paper51.com

    if (j == 0)

http://www.paper51.com

    {

copyright paper51.com

       ++wrong;

内容来自www.paper51.com

    } // end if copyright paper51.com

} // End of thefunction

http://www.paper51.com

functiongameStart() //游戏开始设置

paper51.com

{ http://www.paper51.com

    speed = 1 * grade;//等级 paper51.com

    score = 0; http://www.paper51.com

    shown = 0; copyright paper51.com

    pass = 0;

http://www.paper51.com

    done = 0; 内容来自www.paper51.com

    wrong = 0;

copyright paper51.com

    person = "Welcomyou!"; copyright paper51.com

    time1 = 0;

内容来自论文无忧网 www.paper51.com

    T = 0;

内容来自论文无忧网 www.paper51.com

    if (S > 17)

paper51.com

    { 内容来自论文无忧网 www.paper51.com

        M =0; 内容来自www.paper51.com

    }

paper51.com

    else copyright paper51.com

    { http://www.paper51.com

        M =90;

paper51.com

    } // end else if copyright paper51.com

} // End of thefunction

paper51.com

functiongamePlay()

copyright paper51.com

{ 内容来自www.paper51.com

    Time = new Date(); paper51.com

    time2 = Time.getSeconds();

内容来自论文无忧网 www.paper51.com

    if (timer > 1) copyright paper51.com

    { http://www.paper51.com

        for(i = 0; i < NUMBER; i++) copyright paper51.com

        {

内容来自www.paper51.com

           if (a[i] == 0)

内容来自www.paper51.com

           { 内容来自论文无忧网 www.paper51.com

               do

http://www.paper51.com

               { 内容来自论文无忧网 www.paper51.com

                    b= M + random(S); http://www.paper51.com

               } while (b == 40 || b == 51 || b == 50 || b == 87 || b == 107 || b ==108 || b == 109)

http://www.paper51.com

               c = "_" + b;

paper51.com

               a[i] = c + "_" + i; paper51.com

               _root.attachMovie(c, a[i], i);

copyright paper51.com

                setProperty(_root.a[i],_x, BEGAIN); 内容来自论文无忧网 www.paper51.com

               setProperty(_root.a[i], _y, 32 + i * 34);

copyright paper51.com

               ++shown;

http://www.paper51.com

           } // end if

paper51.com

           if (a[i] != 0 && getProperty(_root.a[i], _x) < END) http://www.paper51.com

           { 内容来自论文无忧网 www.paper51.com

               setProperty(_root.a[i], _x, getProperty(_root.a[i], _x) + speed);

内容来自www.paper51.com

               continue;

内容来自论文无忧网 www.paper51.com

           } // end if http://www.paper51.com

           if (a[i] != 0 && _root.a[i]._x >= END)

paper51.com

           {

copyright paper51.com

               removeMovieClip (a[i]); 内容来自www.paper51.com

               ++pass;

copyright paper51.com

               a[i] = 0; paper51.com

           } // end if paper51.com

        } //end of for

paper51.com

    }

paper51.com

    else paper51.com

    {

http://www.paper51.com

        for(i = 0; i < NUMBER; i++) copyright paper51.com

        {

paper51.com

           if (a[i] != 0)

copyright paper51.com

           { 内容来自www.paper51.com

               removeMovieClip (a[i]); copyright paper51.com

               ++done;

内容来自论文无忧网 www.paper51.com

           } // end if

paper51.com

        } // end of for

http://www.paper51.com

        if(score > 59) 内容来自www.paper51.com

        {

内容来自www.paper51.com

           gotoAndPlay("disan"); 内容来自论文无忧网 www.paper51.com

        } http://www.paper51.com

        else

内容来自论文无忧网 www.paper51.com

        {

http://www.paper51.com

           gotoAndPlay("disi");

http://www.paper51.com

        } //end else if

copyright paper51.com

    } // end else if

copyright paper51.com

    z = time2 - time1; http://www.paper51.com

    if (Math.abs(z) >= 1&& timer != 0)

paper51.com

    { http://www.paper51.com

       --timer; http://www.paper51.com

    } // end if http://www.paper51.com

    time1 = time2;

copyright paper51.com

    if (int((done - pass -wrong) / shown * 100) >= 0)

内容来自论文无忧网 www.paper51.com

    {

http://www.paper51.com

       score = int((done - pass - wrong) / shown * 100); paper51.com

    } paper51.com

    else paper51.com

    { copyright paper51.com

       score = 0;

http://www.paper51.com

    } // end else if

paper51.com

} // End of thefunction http://www.paper51.com

screen(); 内容来自论文无忧网 www.paper51.com

zz = 0; paper51.com

time111 ="time112";

http://www.paper51.com

choice = -1;

copyright paper51.com

grade =fgrade.selectedItem.data;

copyright paper51.com

speed = 1 * grade; 内容来自论文无忧网 www.paper51.com

score = 0; paper51.com

S =farea.selectedItem.data; paper51.com

shown = 0;

内容来自www.paper51.com

pass = 0;

http://www.paper51.com

done = 0;

内容来自www.paper51.com

wrong = 0; copyright paper51.com

shift = 0;

copyright paper51.com

person = NAME; http://www.paper51.com

time1 = 0; 内容来自论文无忧网 www.paper51.com

BEGAIN = 0; 内容来自论文无忧网 www.paper51.com

END = 600;

copyright paper51.com

Y1 = 16;

copyright paper51.com

Y2 = 240; copyright paper51.com

NUMBER = 6; 内容来自论文无忧网 www.paper51.com

T = 0;

内容来自论文无忧网 www.paper51.com

if (S > 17)

http://www.paper51.com

{

http://www.paper51.com

    M = 0;

内容来自www.paper51.com

}

http://www.paper51.com

else 内容来自论文无忧网 www.paper51.com

{ paper51.com

    M = 90; paper51.com

} // end else if

内容来自www.paper51.com

a = newArray(NUMBER);□

内容来自www.paper51.com

for (i = 0; i<= NUMBER; i++)

copyright paper51.com

{ 内容来自论文无忧网 www.paper51.com

    a[i] = 0;

内容来自www.paper51.com

} // end of for copyright paper51.com

diaoyong = newArray(6);

内容来自www.paper51.com

for (i = 0; i <6; i++) 内容来自论文无忧网 www.paper51.com

{ 内容来自www.paper51.com

    diaoyong[i] = 0; 内容来自www.paper51.com

} // end of for 内容来自论文无忧网 www.paper51.com

bgsound = newSound(); http://www.paper51.com

jians = newSound(); 内容来自论文无忧网 www.paper51.com

my = new Object(); paper51.com

my.onKeyDown =function ()//定义键,onkeydown 事件会在用户按下一个键盘 http://www.paper51.com

------分隔线----------------------------
联系方式