Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DHTML quiz/game wanted

Posted on 2002-07-02
5
Medium Priority
?
219 Views
Last Modified: 2011-09-20
Hi there...

need some help with DHTML code to create a small game.
Basically (at it's simplest), there will be 3 images down the left of the page...  A Fireman, A policeman, and A Doctor.  Then down the right of the page...  3 images... of the FireStation, the Hospital and the Police Station.

Now I want the images to be able to be dragged ontop of the relevant "matching image"... and when done correctly...  A big "well done" message or similar (and preferably the 2 relevant images moved off the 'playing area').  If the doctor is dragged onto the Fire Station... The "WRONG" message is displayed, and the image reset on screen for the user to try again....

Once all 3 pairs are matched up, a game over message is displayed...  

(I'm also looking for the whole thing to be timed, but this isn't as vital).

Any advice on similar sites, or even better, working examples of this type of game are required...

Thanks
Gary
0
Comment
Question by:garyennis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 1

Author Comment

by:garyennis
ID: 7159557
OK... you're links were quite helpful and I've managed to put together a version of my game!!! (very simple mind you!)....

I need just a little bit of help to get the exact desired affect that I'm after....

You can download the files here:
www.scottisharchitecture.com/drag.zip

What I still want it to do (but haven't been able to achieve) is the following:

1) I cant get the doOverTarget() function to work....  (don't know why..)...  The doOutTarget() works fine...

2) Once the correct person is in the correct house (you'll see what I mean)... I want the dragEnabled property on the image to be turned off (so it can't be moved any more).

That's it....
Once I get the above 2 things sorted, I'll pay out the points!! (might even increase them too!!!)...

Thanks
Gary
0
 
LVL 4

Accepted Solution

by:
ckosloski earned 2000 total points
ID: 7159829
1.  You are missing the ending quotes on the style attribute of the three divs (doctor, policeman, fireman).

2.Add this line after the good move alert to remove the dragEnabled attribute:
elDragged.removeAttribute("dragEnabled");

If you have any problems I can post the full code.

Corey

0
 
LVL 1

Author Comment

by:garyennis
ID: 7162595
Many thanks!!!!
You have sorted it for me!!!

Points increased!
0
 
LVL 1

Author Comment

by:garyennis
ID: 7953429
Don't suppose you could also answer the question I asked at:
http://www.experts-exchange.com/Web/Q_20487166.html

Thanks!
0

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question