ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î


ÀÚ¹Ù½ºÅ©¸³Æ®·Î ÀÛ¼ºÇÑ ±×¸²¸ÂÃß±â ÆÛÁñ°ÔÀÓ ¸¸µé±â
ȨÆäÀÌÁöȨÆäÀÌÁö 20³â Àü
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>ÆÛÁñ</title>
<script language="JavaScript">
<!--
//////////////////////////////////////////////////////////////////////////////
// »ç¿ëÀÚ ¼³Á¤
//////////////////////////////////////////////////////////////////////////////
var h_count = 5;                                      // °¡·Î·Î ÂÉ°¶ °¹¼ö
var v_count = 4;                                      // ¼¼·Î·Î ÂÉ°¶ °¹¼ö
var p_img = "puzzle_copy.jpg";                // »ç¿ëÇÒ À̹ÌÁö
var p_width = 455;                                   // À̹ÌÁö Æø
var p_height = 340;                                  // À̹ÌÁö ³ôÀÌ
var blank_point = 2;                                 // »óÁÂ:1, »ó¿ì:2, ÇÏÁÂ:3, ÇÏ¿ì:4

function complete_job() {                        // ³¡³µÀ»¶§ ÇÒ ÀÏ
        alert('ÃàÇÏÇÕ´Ï´Ù.');
}
//////////////////////////////////////////////////////////////////////////////



var init_x = 0;
var init_y = 0;

var cell_width = eval(p_width / h_count);
var cell_height = eval(p_height / v_count);

var cur_x;
var cur_y;
var shuffle_now = false;

function move_clip(i, j) {
        if (i-1 >= 0 && eval("puzzle_"+(i-1)+"_"+j+".innerHTML") == "") {
                eval("puzzle_"+(i-1)+"_"+j+".innerHTML=puzzle_"+i+"_"+j+".innerHTML");
                eval("puzzle_"+i+"_"+j+".innerHTML=''");
                cur_x = i;
                cur_y = j;
        }

        if (i+1 < v_count && eval("puzzle_"+(i+1)+"_"+j+".innerHTML") == "") {
                eval("puzzle_"+(i+1)+"_"+j+".innerHTML=puzzle_"+i+"_"+j+".innerHTML");
                eval("puzzle_"+i+"_"+j+".innerHTML=''");
                cur_x = i;
                cur_y = j;
        }
        
        if (j-1 >= 0 && eval("puzzle_"+i+"_"+(j-1)+".innerHTML") == "") {
                eval("puzzle_"+i+"_"+(j-1)+".innerHTML=puzzle_"+i+"_"+j+".innerHTML");
                eval("puzzle_"+i+"_"+j+".innerHTML=''");
                cur_x = i;
                cur_y = j;
        }
        
        if (j+1 < h_count && eval("puzzle_"+i+"_"+(j+1)+".innerHTML") == "") {
                eval("puzzle_"+i+"_"+(j+1)+".innerHTML=puzzle_"+i+"_"+j+".innerHTML");
                eval("puzzle_"+i+"_"+j+".innerHTML=''");
                cur_x = i;
                cur_y = j;
        }
        
        if (shuffle_now==false) {complete_check();}
}

function shuffle() {
        shuffle_now = true;
        rnd_x = eval(cur_x + Math.round(Math.random()*2) - 1);
        rnd_y = eval(cur_y + Math.round(Math.random()*2) - 1);

        if (rnd_x<0) {rnd_x=0;}
        if (rnd_y<0) {rnd_y=0;}
        if (rnd_x>=v_count) {rnd_x=v_count-1;}
        if (rnd_y>=h_count) {rnd_y=h_count-1;}

        move_clip(rnd_x, rnd_y);
}

function shuffle_all() {
        shuffle_rate = h_count*v_count*10;
        for (i=0; i<shuffle_rate; i++) { shuffle(); }
        shuffle_now=false;
}

function complete_check() {
        miss_match = 0;


        for (i=0; i<v_count; i++) {
                for (j=0; j<h_count; j++) {
                        if (eval("clip_"+i+"_"+j+".parentElement.id.toString()") != "puzzle_"+i+"_"+j) {
                                miss_match = miss_match + 1;
                        }
                }
        }

        if (miss_match==1) {
                complete_job();
        }
}

//-->
</script>
</head>
<body>
<table border="1">
    <tr>
        <td>
                        <script language="JavaScript">
                                document.write("<div id='layer1' style='overflow:hidden; width:"+p_width+"px; height:"+p_height+"px; position:relative; left:0px; top:0px;'>");
                                for (i=0; i<v_count; i++) {
                                        for (j=0; j<h_count; j++) {
                                                left_position = j*cell_width;
                                                top_position = i*cell_height;
                                                rel_top_position = (i*cell_height)-(j*cell_height);
                                                rel_top_position = rel_top_position - i*((h_count-1)*cell_height);
                                                rel_top_position = rel_top_position - (i*cell_height);

                                                document.write("<div id='puzzle_"+i+"_"+j+"' style='width:"+cell_width+"px; height:"+cell_height+"px; position:relative; left:"+(left_position + init_x)+"px; top:"+(rel_top_position + init_y)+"px; z-index:1; overflow : hidden;' onmouseover=\"this.style.cursor='hand'\"; onclick='move_clip("+i+", "+j+")'>");
                                                document.write("<img name='clip_"+i+"_"+j+"' src='"+p_img+"' border='0' style='position:relative; left:"+eval(left_position*(-1))+"px; top:"+eval(top_position*(-1))+"px; z-index:1;'>");
                                                document.write("</div>");
                                        }
                                }
                                document.write("</div>");


                                switch(blank_point) {
                                        case 1:
                                                eval("puzzle_0_0.innerHTML = ''");
                                                cur_x = 0;
                                                cur_y = 0;
                                                break;
                                        case 3:
                                                eval("puzzle_"+(i-1)+"_0.innerHTML = ''");
                                                cur_x = v_count - 1;
                                                cur_y = 0;
                                                break;
                                        case 2:
                                                eval("puzzle_0_"+(j-1)+".innerHTML = ''");
                                                cur_x = 0;
                                                cur_y = h_count - 1;
                                                break;
                                        case 4:
                                                eval("puzzle_"+(i-1)+"_"+(j-1)+".innerHTML = ''");
                                                cur_x = v_count - 1;
                                                cur_y = h_count - 1;
                                                break;
                                        default:                                        
                                                eval("puzzle_"+(i-1)+"_"+(j-1)+".innerHTML = ''");
                                                cur_x = v_count - 1;
                                                cur_y = h_count - 1;
                                }
                                document.write("<input type='hidden' name='clip_"+cur_x+"_"+cur_y+"'>");
                        </script>
        </td>
        <td>
                        <img src="puzzle_copy.jpg" width="455" height="340" border="0">            
        </td>
    </tr>
</table>
<br>
<input type=button value="¼¯±â" onclick="shuffle_all()">
</body>

</html>
ÃßõÃßõ : 362 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
275
ÀÚµ¿À¸·Î âÀ» ´Ý¾ÆÁÖ´Â ¼Ò½º
274
ƯÁ¤Å©±âÀÇ À©µµ¿ì¸¦ ¿­°í ÀÚµ¿À¸·Î ´ÝÈ÷´Â À¥ÆäÀÌÁö ¸¸µé±â
273
ƯÁ¤°æ·ÎÀÇ exe½ÇÇàÆÄÀÏÀ» ¿¬°áÇØÁÖ°í ²¨Áö´Â À¥ÆäÀÌÁö¸¸µé±â
272
Å°º¸µå ±ÝÁö_°æ°íâ ¾øÀ½
271
ȨÆäÀÌÁöÁ¢¼Ó ½Ã°£,³¯Â¥ Ç¥½Ã±â
270
¾Æ±ââ ÀÚµ¿À¸·ç ¶ç¿ì°í ¾ö¸¶Ã¢ ÀÚµ¿À¸·ç Á×À̱â -_-;;
269
¸µÅ© Æ÷Ä¿½º ¾ø¾Ö±â 3ź
268
ŸÀÌƲ ³»¿ë ¿©·¯°³·Î ¹Ù²Ù±â
267
Å©·Òâ ¶ç¿ì±â ¼Ò½º
266
±ò²ûÇÑ ÀüÀÚ °è»ê±â
265
½Ã°£´ëº°·Î ¹è°æ»ö»ó ¹Ù²Ù±â
264
Á¢¼Ó½Ã¸¶´Ù ¹è°æÀ½¾Ç ´Ù¸£°Ô
263
¿À¸¥Âʸ¶¿ì½º,Ŭ¸¯ÇÏ¸é ³ªÅ¸³ª´Â ¸Þ´º
262
Æ˾÷â ÇϷ絿¾È ÀÌâ ¶ç¿ìÁö ¾Ê±â
261
¹æ¹®½Ã ¸¶´Ù ´Ù¸¥ index º¸¿©ÁÖ±â
260
È­¸éÀüü ½ºÅ©·Ñ ÀÚµ¿È帧,Á¤Áö
259
ºê¶ó¿ìÀú ½ºÅ©·ÑÆ®·¢ ¾ø¾Ö±â
258
Çѹø¿¡ ¸µÅ©Å׵θ® ¾ø¾Ö±â
257
¶ç¿öÁø »õâ´Ý±â ¼Ò½º
256
ÇÁ·¹ÀÓ ¼Ò½ºº¸±â ¸·±â
255
Áß¾Ó¿¡ ¶ß°ÔÇÏ´Â »õâ
254
Æ˾÷â 2°³ ¶ç¿ì±â
253
°Ô½ÃÆÇÀ» Æ˾÷À¸·Î ¶ç¿ìÀÚ
252
¹è°æÀ½¾Ç ¿äÀϸ¶´Ù ÀÚµ¿À¸·Î ¹Ù²Ù±â
251
Å×À̺í ÀÚµ¿À¸·Î ´Ã¾ú´Ù Ä¿Áö±â
250
Æ®·£Áö¼Ç °øÁö»çÇ×!!
249
½Ä´ë °è»ê±â... ^^
248
Ŭ¸¯Çϸé ȨÆäÀÌÁö¸¦ ½ÃÀÛÆäÀÌÁö·Î ÇÏ´Â ¼Ò½º...
247
À̹ÌÁö µå·¡±×Çϱâ..~~
ÀÚ¹Ù½ºÅ©¸³Æ®·Î ÀÛ¼ºÇÑ ±×¸²¸ÂÃß±â ÆÛÁñ°ÔÀÓ ¸¸µé±â
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.