HRA: RIDGE LAYER

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

135
p135.html / p135.zip
Vesmirna strielacka.
29617b
NN 4.04

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code (p135.html):

<HTML> <HEAD> <TITLE>JavaScript DESTINATION - P135</TITLE> </HEAD> <FRAMESET COLS="320,*"> <FRAMESET ROWS="270,*"> <FRAME SRC="main.html" NAME="gmain" NORESIZE SCROLLING="NO"> <FRAME SRC="control.html" NAME="gcontrol" NORESIZE SCROLLING="NO"> </FRAMESET> <FRAME SRC="score.html" NAME="gscore"> </FRAMESET> </HTML>

Zdrojovy tvar / Source code (score.html):

<HTML> <FORM NAME="fgscore"> <HEAD> <TITLE>GAME SCORE FRAME</TITLE> </HEAD> <BODY BGCOLOR="#000000" TEXT="#FFFFFF"> <H3><CENTER>RIDGE LAYER</CENTER></H3><P> <PRE>SCORE <INPUT TYPE="text" NAME="MES" SIZE=9 VALUE = "0" > bodov</PRE> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene0.gif'>....100 bodov<P> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene1.gif'>....50 bodov<P> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene2.gif'>....20 bodov<P> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene3.gif'>....10 bodov<P> ZA VYSTRIELANIE....BONUS body<P> <br> <br> <center> <a href="javascript:history.back()" TARGET="_top">Navrat</a> / <a href="priklady-english.html">BACK</a> </center> </BODY> </FORM> </HTML>

Zdrojovy tvar / Source code (main.html):

<HTML> <HEAD> <TITLE>GAME MAIN FRAME</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- var timerID = null var aa=0 var bgscr=-240 var myleft=152 var mymove=0 var enename = new Array(20) var enetop = new Array(20) var eneleft = new Array(20) var eneshow = new Array(20) var eneoff = new Array(20) var offsettop = -120 var offsetleft = 0 var offsetmove = 1 var timecounter = 0 var fireflag=0 var mybullettop=184 var mybulletleft=159 var cload=0 var playflag=0 var score=0 var bonus=0 function compload(){ cload=1 } function fire(){ if (cload == 1){ if (playflag == 0){ playflag=1 initgame() }else{ if (fireflag == 0){ fireflag=1 mybullettop=184 mybulletleft=myleft+7 } } } } function initgame(){ enename[1]="ene00" enename[2]="ene01" enename[3]="ene10" enename[4]="ene11" enename[5]="ene12" enename[6]="ene20" enename[7]="ene21" enename[8]="ene22" enename[9]="ene23" enename[10]="ene30" enename[11]="ene31" enename[12]="ene32" enename[13]="ene33" enename[14]="ene34" enetop[1]=50 enetop[2]=50 enetop[3]=80 enetop[4]=80 enetop[5]=80 enetop[6]=80 enetop[7]=80 enetop[8]=80 enetop[9]=80 enetop[10]=100 enetop[11]=100 enetop[12]=100 enetop[13]=100 enetop[14]=100 eneleft[1]=132 eneleft[2]=172 eneleft[3]=132 eneleft[4]=152 eneleft[5]=172 eneleft[6]=92 eneleft[7]=112 eneleft[8]=192 eneleft[9]=212 eneleft[10]=112 eneleft[11]=132 eneleft[12]=152 eneleft[13]=172 eneleft[14]=192 document.layers["bullet1"].visibility="HIDE" document.layers["bullet2"].visibility="HIDE" document.layers["bullet3"].visibility="HIDE" document.layers["bullet4"].visibility="HIDE" document.layers["bullet5"].visibility="HIDE" document.layers["bullet6"].visibility="HIDE" document.layers["bullet7"].visibility="HIDE" myleft=152 bgscr=-240 offsettop=-120 offsetleft=0 offsetmove=1 timecounter=0 mybullettop=184 mybulletleft=159 score=0 bonus=0 document.layers["perfect"].visibility="HIDE" document.layers["mychr"].visibility="SHOW" for (ia=1; ia<15; ia++){ eneshow[ia]="SHOW" eneoff[ia]=0 } timerID = setTimeout("interval1()",100) } function interval1(){ clearTimeout(timerID) timecounter=timecounter+1 if (timecounter <= 15){offsettop=offsettop+8} if (timecounter >= 185){offsettop=offsettop-8} if (timecounter >= 200){playflag=0} offsetleft=offsetleft+offsetmove if (offsetleft >=2){offsetmove=-1} if (offsetleft <=-7){offsetmove=1} eneoff[1]=-offsetleft eneoff[2]=offsetleft eneoff[3]=-offsetleft eneoff[5]=offsetleft eneoff[6]=-offsetleft*3 eneoff[7]=-offsetleft*2 eneoff[8]=offsetleft*2 eneoff[9]=offsetleft*3 eneoff[10]=-offsetleft*2 eneoff[11]=-offsetleft eneoff[13]=offsetleft eneoff[14]=offsetleft*2 myleft=myleft+mymove if (myleft >= 280){myleft=280} if (myleft <= 40){myleft=40} if (fireflag == 0){ mybullettop=184 mybulletleft=myleft+7 }else{ mybullettop=mybullettop-16 if (mybullettop <= 0){ fireflag=0 } } if (timecounter >= 17){ tmpbulname="bullet1" if (document.layers[tmpbulname].visibility == "hide"){ tmpeneno=6 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew()} }else{ bulletdown() } tmpbulname="bullet7" if (document.layers[tmpbulname].visibility == "hide"){ tmpeneno=9 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew()} }else{ bulletdown() } tmpbulname="bullet2" if (document.layers[tmpbulname].visibility == "hide"){ tmpeneno=10 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew() }else{ tmpeneno=7 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew()} } }else{ bulletdown() } tmpbulname="bullet6" if (document.layers[tmpbulname].visibility == "hide"){ tmpeneno=14 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew() }else{ tmpeneno=8 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew()} } }else{ bulletdown() } tmpbulname="bullet4" if (document.layers[tmpbulname].visibility == "hide"){ tmpeneno=12 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew() }else{ tmpeneno=4 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew()} } }else{ bulletdown() } tmpbulname="bullet3" if (document.layers[tmpbulname].visibility == "hide"){ tmpeneno=11 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew() }else{ tmpeneno=3 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew() }else{ tmpeneno=1 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew()} } } }else{ bulletdown() } tmpbulname="bullet5" if (document.layers[tmpbulname].visibility == "hide"){ tmpeneno=13 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew() }else{ tmpeneno=5 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew() }else{ tmpeneno=2 if (document.layers[enename[tmpeneno]].visibility != "hide"){enenew()} } } }else{ bulletdown() } } bgscr=bgscr+2 if (bgscr == 0){bgscr=-240} for (ib=1; ib<15; ib++){ document.layers[enename[ib]].visibility=eneshow[ib] document.layers[enename[ib]].top=enetop[ib]+offsettop document.layers[enename[ib]].left=eneleft[ib]+eneoff[ib] } document.layers["BG1"].top=bgscr document.layers["mychr"].left=myleft document.layers["bullet0"].top=mybullettop document.layers["bullet0"].left=mybulletleft hitcheck() if (playflag == 1){timerID = setTimeout("interval1()",100)} } function oright(){mymove=4} function oleft(){mymove=-4} function ostop(){mymove=0} function hitcheck(){ for (ic=1; ic<15; ic++){ if (eneshow[ic] == "SHOW"){ tmptop=document.layers[enename[ic]].top tmpleft=document.layers[enename[ic]].left if (tmptop <= mybullettop+11){ if (tmptop >= mybullettop-5){ if (tmpleft >= mybulletleft-12){ if (tmpleft <= mybulletleft-2){ fireflag=0 eneshow[ic]="HIDE" if (ic <= 2){tempscore=100 }else{ if (ic <= 5){tempscore=50 }else{ if (ic <= 9){tempscore=20 }else{ tempscore=10 } } } score=score+tempscore if (score == 480){ playflag=0 bonus=(200-timecounter)*10 score=score+bonus document.layers["perfect"].visibility="SHOW" } parent.gscore.document.fgscore.MES.value=score } } } } } } } function enenew(){ with (Math) { tmprnd = floor(random()*10) } if (tmprnd == 3){ document.layers[tmpbulname].visibility="SHOW" document.layers[tmpbulname].top=document.layers[enename[tmpeneno]].top+16 document.layers[tmpbulname].left=document.layers[enename[tmpeneno]].left+7 } } function bulletdown(){ tmpdown1=document.layers[tmpbulname].top tmpdown1=tmpdown1+8 document.layers[tmpbulname].top=tmpdown1 if (tmpdown1 >= 225){ document.layers[tmpbulname].visibility="HIDE" } if (tmpdown1 >= 193){ if (tmpdown1 <= 215){ tmpeneleft=document.layers[tmpbulname].left tmpmyleft=document.layers["mychr"].left if (tmpmyleft <= tmpeneleft-1){ if (tmpmyleft >= tmpeneleft-13){ playflag=0 document.layers["mychr"].visibility="HIDE" parent.gscore.document.fgscore.MES.value="KONIEC HRY" } } } } } function nop(){} // --> </SCRIPT> </HEAD> <FORM NAME="fgmain"> <BODY BGCOLOR="#000000" TEXT="#FFFFFF" LINK="#000000" VLINK="#000000" onLoad="compload()"> <A NAME="t0"><LAYER NAME="null0" LEFT="0" TOP="0" WIDTH="300" visibility="HIDE"></LAYER></A> <LAYER NAME="BG1" LEFT="0" TOP="0" WIDTH="300" visibility="SHOW"> <IMG BORDER=0 SRC='bg.gif'> </LAYER> <LAYER NAME="ene00" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene0.gif'> </LAYER> <LAYER NAME="ene01" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene0.gif'> </LAYER> <LAYER NAME="ene10" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene1.gif'> </LAYER> <LAYER NAME="ene11" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene1.gif'> </LAYER> <LAYER NAME="ene12" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene1.gif'> </LAYER> <LAYER NAME="ene20" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene2.gif'> </LAYER> <LAYER NAME="ene21" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene2.gif'> </LAYER> <LAYER NAME="ene22" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene2.gif'> </LAYER> <LAYER NAME="ene23" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene2.gif'> </LAYER> <LAYER NAME="ene30" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene3.gif'> </LAYER> <LAYER NAME="ene31" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene3.gif'> </LAYER> <LAYER NAME="ene32" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene3.gif'> </LAYER> <LAYER NAME="ene33" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene3.gif'> </LAYER> <LAYER NAME="ene34" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='ene3.gif'> </LAYER> <LAYER NAME="mychr" LEFT="152" TOP="200" WIDTH="320" visibility="SHOW"> <IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC='mychr0.gif'> </LAYER> <LAYER NAME="bullet0" LEFT="159" TOP="184" WIDTH="320" visibility="SHOW"> <IMG BORDER=0 WIDTH=1 HEIGHT=8 SRC='bullet0.gif'> </LAYER> <LAYER NAME="bullet1" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=1 HEIGHT=8 SRC='bullet1.gif'> </LAYER> <LAYER NAME="bullet2" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=1 HEIGHT=8 SRC='bullet1.gif'> </LAYER> <LAYER NAME="bullet3" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=1 HEIGHT=8 SRC='bullet1.gif'> </LAYER> <LAYER NAME="bullet4" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=1 HEIGHT=8 SRC='bullet1.gif'> </LAYER> <LAYER NAME="bullet5" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=1 HEIGHT=8 SRC='bullet1.gif'> </LAYER> <LAYER NAME="bullet6" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=1 HEIGHT=8 SRC='bullet1.gif'> </LAYER> <LAYER NAME="bullet7" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=1 HEIGHT=8 SRC='bullet1.gif'> </LAYER> <LAYER NAME="perfect" LEFT="0" TOP="0" WIDTH="320" visibility="HIDE"> <IMG BORDER=0 WIDTH=320 HEIGHT=240 SRC='perfect.gif'> </LAYER> <LAYER NAME="CTRL" LEFT="34" TOP="225" WIDTH="320" visibility="SHOW"> <A HREF="#t0" onClick="fire()" onMouseOver="oleft()"><IMG SRC="btn1.gif"></A><A HREF="#t0" onClick="fire()" onMouseOver="ostop()"><IMG SRC="btn0.gif"></A><A HREF="#t0" onClick="fire()" onMouseOver="oright()"><IMG SRC="btn2.gif"></A> </LAYER> </BODY> </FORM> </HTML>

Zdrojovy tvar / Source code (control.html):

<HTML> <FORM NAME="fgcontrol"> <HEAD> <TITLE>GAME CONTROL FRAME</TITLE> </HEAD> <BODY BGCOLOR="#000000" TEXT="#FFFFFF"> <FONT SIZE="-1"> <CENTER>START/RESET....Klikni na lubovolne tlacitko</CENTER> </FONT> </BODY> </FORM> </HTML>
[ Navrat / BACK ]