WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Puzzle game help! Empty Puzzle game help! Wed Jul 14, 2010 4:48 am

Unknown Data

Unknown Data
Registered Member
Registered Member
Hello Guest.

I'm making a game to my site, and it's a kind of special.
First of all, this i my code (See the script in action here).
Code:
<BODY onLoad="checkit()">
<SCRIPT LANGUAGE="JavaScript">
<!--
var temp = new Image()
var loc
var gotit
function checkit()
{
        if ((navigator.appName=="Microsoft Internet Explorer")
        && (parseInt(navigator.appVersion) >= 4))
        return
        else
        alert("For at spille skal du have IE4 eller bedre version")
}
function exch()
{
        if ((event.button == 1) && (event.srcElement.className == "drag"))
        {
                if (gotit == 1)
                {
                        gotit = 0
                        document.images[loc].src = document.images[event.srcElement.name].src
                        document.images[event.srcElement.name].src = temp.src
                }
                else
                {
                        gotit = 1
                        loc = event.srcElement.name
                        temp.src = document.images[loc].src
                }
        }
}
document.onmousedown=exch
// -->
</SCRIPT>
<CENTER>
<NOSCRIPT>
To play this game, you need IE 4 or greater
</NOSCRIPT>
<div onclick="addItem('counttuna');">
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" STYLE="border:15px ridge gold">
<TR>
<TD><IMG SRC="http://img683.imageshack.us/img683/3106/112iq.png" WIDTH="120" HEIGHT="112" NAME="pic1" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img96.imageshack.us/img96/3397/111sag.png" WIDTH="120" HEIGHT="112" NAME="pic2" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img9.imageshack.us/img9/5897/21202531.png" WIDTH="120" HEIGHT="112" NAME="pic3" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img683.imageshack.us/img683/543/116k.png" WIDTH="120" HEIGHT="112" NAME="pic4" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img94.imageshack.us/img94/194/76393277.png" WIDTH="120" HEIGHT="112" NAME="pic5" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img155.imageshack.us/img155/2774/27348778.png" WIDTH="120" HEIGHT="112"  NAME="pic6" CLASS="drag" ALT=""></TD>
</TR>
<TR>
<TD><IMG SRC="http://img688.imageshack.us/img688/4016/114kb.png" WIDTH="120" HEIGHT="112" NAME="pic7" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img819.imageshack.us/img819/9982/68965468.png" WIDTH="120" HEIGHT="112" NAME="pic8" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img682.imageshack.us/img682/4308/118.png" WIDTH="120" HEIGHT="112" NAME="pic9" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img716.imageshack.us/img716/1051/53718267.png" WIDTH="120" HEIGHT="112" NAME="pic10" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img641.imageshack.us/img641/5090/113li.png" WIDTH="120" HEIGHT="112" NAME="pic11" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img257.imageshack.us/img257/2254/45222859.png" WIDTH="120" HEIGHT="112" NAME="pic12" CLASS="drag" ALT=""></TD>
</TR>
<TR>
<TD><IMG SRC="http://img257.imageshack.us/img257/4754/22027596.png" WIDTH="120" HEIGHT="112" NAME="pic13" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img805.imageshack.us/img805/8729/110.png" WIDTH="120" HEIGHT="112" NAME="pic14" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img714.imageshack.us/img714/4144/77678307.png" WIDTH="120" HEIGHT="112" NAME="pic15" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img42.imageshack.us/img42/5281/117c.png" WIDTH="120" HEIGHT="112" NAME="pic16" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img517.imageshack.us/img517/1672/115gu.png" WIDTH="120" HEIGHT="112" NAME="pic17" CLASS="drag" ALT=""></TD>
<TD><IMG SRC="http://img571.imageshack.us/img571/5560/78425124.png" WIDTH="120" HEIGHT="112" NAME="pic18" CLASS="drag" ALT=""></TD>
</TR>
</TABLE>
</div>
<BR>
</CENTER></BODY>

<script type="text/javascript">
function addItem(thecount){
document.getElementById(thecount).innerHTML = parseFloat(document.getElementById(thecount).innerHTML)+1;
}
</script>

<style>

div#box {position: absolute; top: 139px; left: 220px; border: 1px solid black; padding: 5px; width: 160px; font: 13px Verdana;}

</style>
<div id="box">
You have used <span id="counttuna">0</span> attempt.
</div>
1. First of all, I want to make the puzzle checkers show randomly each time someone load the page, so it's not easy to solve the puzzle after one play.
2. When someone is done with the game and solved the puzzle a alert PopUp will show up, standing you're done and how many attempt there is used.

Thanks for helping in advance! Smile

~Unknown Data



Last edited by Unknown Data on Thu Jul 15, 2010 5:11 pm; edited 1 time in total

http://woops.dk

2Puzzle game help! Empty Re: Puzzle game help! Wed Jul 14, 2010 9:46 pm

ankillien

ankillien
Administrator
Administrator
Hey!

Sorry, I don't understand this game Neutral and can't understand how to play/finish it.

3Puzzle game help! Empty Re: Puzzle game help! Wed Jul 14, 2010 9:56 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
It's "just" to press a checker and press another one, they'll switch and to the end a done puzzle should be shown (The little box were beside the puzzle is how many tries you had used).

The problem is, that I can't add a child alert popup window, which saying fx "you're done, it took # tries" when the player is done.

The other thing is to let the checkers change space each time someone load the page.

http://woops.dk

4Puzzle game help! Empty Re: Puzzle game help! Thu Jul 15, 2010 5:12 am

Nem

Nem
Registered Member
Registered Member
UD, They don't switch when I click them.

http://www.graphics-post.com/forum

5Puzzle game help! Empty Re: Puzzle game help! Thu Jul 15, 2010 11:23 am

ankillien

ankillien
Administrator
Administrator
Nem wrote:UD, They don't switch when I click them.

Same problem with me Rolling Eyes

6Puzzle game help! Empty Re: Puzzle game help! Thu Jul 15, 2010 5:11 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
Oh okay, just find out that its only working for IE and greater, as I can see.
Sorry to bother you guys.

Solved | Locked

http://woops.dk

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum