테스트 사이트 - 개발 중인 베타 버전입니다

애니메이션 효과 문의.

· 13년 전 · 1486 · 4
숫자가 증가되는게.

슬롯머신 처럼 증가되는 코드 없을까요?

없다면 어떻게 만들어야 하는지 나오는 싸이트라도 알고 계시는분 링크좀 부탁드립니다.

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 4개

13년 전
슬롯머신 소스요

##############################################
<center>
<form name="slots" onsubmit="rollem(); return false;">
<table border="0" cellpadding="3" cellspacing="1" width="300" style="border:1 solid #000000;">
<tr>
<th colspan="2">슬롯머신 게임</th>
</tr>
<tr>
<th align="right"> Gold: </th>
<td align="left"><input type="box" size="5" name="gold" READONLY value="50"></td>
</tr>
<tr>
<th align="right"> Your bet: </th>
<td align="left"><input type="box" size="5" name="bet"></td>
</tr>
<tr>
<th><input type="submit" value="Spin the slots"></th>
<th><input type="button" value="I am done for now" onclick="stopplay();"></th>
</tr>
<tr>
<th colspan="2"><input type="reset" value="Start over"></th>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td colspan="2" align="center">
<img src="slot_1.gif" name="slot1">
<img src="slot_2.gif" name="slot2">
<img src="slot_3.gif" name="slot3">
<br>
<input type="text" readonly size="40" name="banner">
</td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td colspan="2">
<table width="100%" border="0">
<tr>
<th colspan="3"><font size="4">Payouts</th>
</tr>
<tr>
<th> 3 of a Kind </th>
<td align="center"><img src="slot_1.gif"><img src="slot_1.gif"><img src="slot_1.gif"></td>
<th> 10x your bet </th>
</tr>
<tr>
<th> A Pair </th>
<td align="center"><img src="slot_2.gif"><img src="slot_2.gif"><img src="slot_3.gif"></td>
<th> 2x your bet </th>
</tr>
<tr>
<th> or </th>
<td align="center"><img src="slot_0.gif"><img src="slot_4.gif"><img src="slot_4.gif"></td>
<th> 2x your bet </th>
</tr>
<tr>
<th> or </th>
<td align="center"><img src="slot_5.gif"><img src="slot_6.gif"><img src="slot_5.gif"></td>
<th> 2x your bet </th>
</tr>
<tr>
<th> No Match </th>
<td align="center"><img src="slot_7.gif"><img src="slot_8.gif"><img src="slot_9.gif"></td>
<th> You lose </th>
</tr>
</table>
</td>
</tr>
</table>
</form>
</cetner>

<script language="javascript">
<!--
// 소스 제작자 coptright..
// 소스 사용시 이 부분은 지우면 안됩니다.
// ############# Copyright 2002, Patrick Lewis
// ############# www.PatrickLewis.net

// 게임에 사용되는 전체 이미지 갯수
slotitem = new Array('0','1','2','3','4','5','6','7','8','9');
document.slots.bet.focus();

startgold=50; // 시작 잔금 - 이 부분 수정 후 윗 부분 폼의 값도 수정
document.slots.gold.value=startgold;

function stopplay () {
if (document.slots.gold.value < startgold)
{alert("당신은 "+ (startgold-document.slots.gold.value) +" gold를 잃었습니다.");}
else {alert("당신은 "+ (document.slots.gold.value-startgold) +" gold를 획득했습니다.");}
}

function rollem () {
if (document.slots.bet.value<1 || document.slots.bet.value == "") {alert("베팅할 금액이 없습니다."); return;}
if (Math.floor(document.slots.gold.value) < Math.floor(document.slots.bet.value)) {alert("당신은 "+document.slots.bet.value+" gold를 베팅하여 잔금을 모두 잃었으며\n"+document.slots.gold.value+" gold의 잔금으론 게임 진행이 안되므로 새로 시작하여 주십시오."); return;}
if (document.slots.bet.value>1) {document.slots.banner.value="베팅 금액 "+document.slots.bet.value+" gold입니다.";}
else {document.slots.banner.value="베팅 금액 "+document.slots.bet.value+" gold입니다.";}
counter=0;
spinem();
}


function spinem() { // 슬롯 돌릴시 이미지 경로 부분
turns1=10+Math.floor((Math.random() * 10))
for (a=0;a<turns1;a++)
{document.slots.slot1.src="slot_"+slotitem[a % 9]+".gif"; }
turns2=10+Math.floor((Math.random() * 10))
for (b=0;b<turns2;b++)
{document.slots.slot2.src="slot_"+slotitem[b % 9]+".gif"; }
turns3=10+Math.floor((Math.random() * 10))
for (c=0;c<turns3;c++)
{document.slots.slot3.src="slot_"+slotitem[c % 9]+".gif"; }
counter++;
if (counter<25) {setTimeout("spinem(counter);",50);} else {checkmatch();}
}


function checkmatch() {
if ((document.slots.slot1.src == document.slots.slot2.src) && (document.slots.slot1.src == document.slots.slot3.src))
{document.slots.banner.value="3 of a Kind - 당신은 "+Math.floor(document.slots.bet.value*10)+" gold를 획득했습니다.";
document.slots.gold.value=Math.floor(document.slots.gold.value)+Math.floor(document.slots.bet.value*10); }
else if ((document.slots.slot1.src == document.slots.slot2.src) ||
(document.slots.slot1.src == document.slots.slot3.src) ||
(document.slots.slot2.src == document.slots.slot3.src))
{document.slots.banner.value="A Pair - 당신은 "+Math.floor(document.slots.bet.value*2)+" gold를 획득했습니다";
document.slots.gold.value = Math.floor(document.slots.bet.value*2) + Math.floor(document.slots.gold.value);}
else {document.slots.gold.value=document.slots.gold.value-document.slots.bet.value;
document.slots.banner.value="No Match - 당신은 "+document.slots.bet.value+" gold를 잃었습니다.";}
}
//-->
</script>
#################################################
13년 전
이게 아닌가?????????????? ㅎㅎㅎ
이거 봤는데 이미지가 없어서 못 써요.
어떻게 동작하는지도 모르겠어요.,
http://www.blueb.co.kr/blueb/javascript.php?mid=8&r=view&uid=70056

게시글 목록

번호 제목
1717629
1717626
1717625
1717621
1717619
1717611
1717610
1717609
1717607
1717601
1717598
1717591
1717590
1717583
1717575
1717572
1717568
1717566
1717549
1717545
1717533
1717512
1717511
1717508
1717495
1717479
1717473
1717470
1717463
1717452