Dieses Spiel ist noch nicht fertig. Der Zweck war nur, Ihnen zu zeigen, dass Sie einige grafische Dinge tun können, ohne externe Bilder verwenden zu müssen.
Wenn Sie dieses Spiel entwickeln möchten, senden Sie bitte Ihre Updates.
Dateiname: htanoid.hta
Anforderung: dh 6?
Autor: Jean-Luc Antoine
Eingereicht: 17/05/2002
Kategorie: Andere
效果图 :
实现代码 :
代码如下::
<html xmlns: v = "Urn: Schemas-microsoft-com: vml" xmlns: t = "Urn: Schemas-microsoft-com: time">
<kopf>
<Hta: Anwendung
ApplicationName = "htanoid"
Border = "dick" | "Dialog" | "Keine" | "dünn"
BORDERSYLE = "Normal" | "Komplex" | "erhoben" | "statisch" | "Sunken"
Caption = "yes" contextMenu = "Ja"
Id = "ohta" alarm (ohta.applicationName);
Innerborder = "Ja" maximizeButton = "Ja" minimizeButton = "Ja"
Navigable = "no" scroll = "no" scrollflat = "nein"
Selection = "yes" showIntaskbar = "yes" SingleInInstance = "Nein"
Sysmenu = "yes" Version = "0,5"
WindowState = "normal" | "Maximieren" | "minimieren">
<script Language = vbScript>
Option explizit
Const c_screenw = 400
Const c_nbx = 12
Const c_nby = 10
Dimer Terrain (10,12)
Dim Raqx, Raqw, Spielen, Ballex, Balley
Dim Dirbx, Dirby'direction balle x, y
Dim Borddroit
BordDroit = C_SCreenW-32
Sub document_onkeypress ()
Wählen Sie Case uCase (CHR (window.event.keyCode)))
Fall "P"
MSGBox "Pause"
'Window.clearTimeout
Ende auswählen
Ende sub
Sub document_onclick ()
Spiele = wahr
'document.title = "klicken" & window.event.button
Ende sub
Sub document_onmousemove ()
Raqx = window.event.clientx-raqw'.shiftkey .KeyCode .ctrlkey .button .altkey
Wenn raqx <16 dann raqx = 16'mur Gauche
Wenn raqx+raqw> borddroit dann raqx = borddroit-raqw ist
Raquette.style.left = raqx
Wenn nicht spielen, dann
Ballex = raqx+raqw/2
Balle.style.left = Ballex
Ende wenn
Ende sub
Unterschild (n) sub -Draspevel
Dim K, x, y
Setzen Sie K = document.getElementById ("Raquette")
Für y = 0 bis c_nby
Für x = 0 bis c_nbx
Gelände (y, x) = 0'nb de Coups restante à porter
Nächste
Nächste
Wählen Sie Fall n
Fall 1
'Ziegel
Für y = 0 bis 5
Für x = 0 bis c_nbx
k.insertadjacentHtml "vorabgin", "<table style = 'Position: absolut; top =" & 102+14*y & "; links =" & 16+27*x _
& "; Breite = 25; Höhe = 10; ' bgcolor = "& array (" silber "," rot "," gelb "," blau "," magenta "," lightgreen ") (y) &"> <tr> <td> </td> </tr> </table> "
Nächste
Nächste
Ende auswählen
Randomisieren
Balley = 400
Dirbx = int (rnd ()*3) +1
Dirby = 0- (int (rnd ()*4) +1)
Ende sub
Sub init
Dim x, y, k