⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flying merino.htm

📁 Build words list automatic
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<meta name="vs_defaultClientScript" content="VBScript">
		<title>Flying Merino</title>
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		
		<script language="vbscript">
		Dim giTimer
		Dim dx 'How far we move at each tick of the timer
		
		Sub btnStart_onClick
			'Code for starting animation when the start button is clicked.
			'Position the image to its starting position
			imgFly.style.pixelTop = 100
			imgFly.style.pixelLeft = 0
			'
			'Set the system timer ticking in order to give
			'an animation effect
			giTimer = window.setInterval(GetRef("Tick"), 100)
			'
			'Set how far we will move the object at each tick
			dx = 10
		End Sub
		
		Sub Tick
			'We have setup this routine to be called by the system timer
			'at a time interval.  We can write code here to change the
			'position, shape etc of objects.
			x = imgFly.style.pixelLeft
			imgFly.style.pixelLeft = x + dx
			'
			'On reaching a side, we start moving the object
			'the other way.
			'Re-assign x because we added dx on before
			x = imgFly.style.pixelLeft
			'
			'Decision: have we reached the left or right side?
			If x >= screen.width And dx > 0 Then
				'We have reached the right hand side while moving 
				'to the right so change direction.
				dx = -dx
				document.getElementById("imgFly").src = "Flying Merino_Files/sheep2b.gif"
			ElseIf x <= 0 And dx < 0 Then
				'We have reached the left hand side while moving 
				'to the left so change direction.
				dx = -dx
				document.getElementById("imgFly").src = "Flying Merino_Files/sheep2a.gif"
			End If
		End Sub

		</script>
	</head>
	<BODY leftMargin="0" rightMargin="0">
		<h1>Flying Merino</h1>
		<input type="button" id="btnStart" name="btnStart" value="Start">
		<img id="imgFly" src="Flying Merino_Files/sheep2a.gif" border="1" 
		 style="LEFT:0px;POSITION:absolute;TOP:100px">
	</BODY>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -