PDA

View Full Version : Drag and drop game help!



pink@fluff
14-02-2005, 11:51 AM
I want to create a simple drag and drop 'dressup' habbo for my website. Can someone either tell me how...or make me one?
I just want a 'naked' habbo with hair, clothes and shoes to put on it. Can anyone help?

zainx
14-02-2005, 12:04 PM
anti-pod has 1 i made for his old site so if u want it ask him it only the boy but it took about 4 hours so in return i want some where on it saying created by lofty mangacars.co.uk

Mentor
14-02-2005, 02:16 PM
<html>
<head>
<style>
<!--
.drag{position:relative;cursor:hand}
-->
</style>
<script language="JavaScript1.2">
<!--
/*Credit JavaScript Kit www.javascriptkit.com*/
var dragapproved=false
var z,x,y
function move(){
if (event.button==1&&dragapproved){
z.style.pixelLeft=temp1+event.clientX-x
z.style.pixelTop=temp2+event.clientY-y
return false
}
}
function drags(){
if (!document.all)
return
if (event.srcElement.className=="drag"){
dragapproved=true
z=event.srcElement
temp1=z.style.pixelLeft
temp2=z.style.pixelTop
x=event.clientX
y=event.clientY
document.onmousemove=move
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")
//-->
</script>

</head>
<body>
<img src="test.gif" class="drag">
<img src="test2.gif" class="drag">
<img src="test3.gif" class="drag">


</body>
</html>

Basicly you can do it to images text etc. All you do is set its calls to drag.

ala this code.
class="drag"


change the image test1.gif or what ever else to what ever images the cloths are. You can ad as many as you want.

to set the main non movebale image just put it in as a normal one without the class="drag" attribute.

Hope this helps

pink@fluff
14-02-2005, 04:00 PM
thnx so much mentor, just to be clear...where do i put this code on my site? head or body or somewhere else..I'm sorta new at all this lol

Mentor
14-02-2005, 07:02 PM
well the top parts set as a page.

but the javascript and css go in the head.

the images go in the body.

-JT-
14-02-2005, 07:22 PM
to be a little less complicated, just copy the whole thing into a black HTML document, it should then work :)

pink@fluff
14-02-2005, 07:23 PM
Thnx i've got it up and running now :)

:Lively
14-02-2005, 08:27 PM
yea, that helped me 2, thx 4 dat, btw check it out if u want:

http://www.rare-ring.habbohosting.net/games/room_design.htm

pink@fluff
14-02-2005, 10:09 PM
nice mike :) mine is at geocities.com/pink_habbo/games
(i will get a .tk once the WHOLE site is ready. plz dont rate the site as its rubbish AT THE MOMENT.

:Lively
15-02-2005, 11:44 AM
ill look forward 2 wen it opens

-JT-
15-02-2005, 12:56 PM
your site looks like it is going to look quite good pink@pluff goodluck

pink@fluff
15-02-2005, 02:38 PM
thnx :) a hell of a lot better than my old freewebs one (no offence to freewebs users), will have a lot more on it.

Janumz
15-02-2005, 03:55 PM
Ooo.. I like the site..
You've done a good job there..
Does it use HTML coding or is it just one u type in and can enter pics etc?

W0000000000000000000T 600TH POST :D:D:D:D

pink@fluff
15-02-2005, 08:30 PM
erm....how have you seen the site? i didnt give the main address and the nav bar on the games page isnt done yet lol.
its not a html one as I wouldnt have a clue where to start though i have managed to disable the right-clicking thnx to habbox's guide lol

Janumz
16-02-2005, 07:57 PM
I went to www.geocities.com/pink_habbo/games :P

pink@fluff
17-02-2005, 12:46 PM
oh sorry i thought you meant you had seen the main site lol..soz

:Lively
17-02-2005, 03:12 PM
pink, u sed u used 2 own a freewebs account, was this www.freewebs.com/pink_habbo

if it was den u wud be a scammer, and dis is likely!


:@

pink@fluff
17-02-2005, 05:27 PM
no it wasnt as that wasnt my freewebs name. i am no scammer.
it was /pinkshabbo

:Lively
17-02-2005, 09:56 PM
dat website doesnt exist!

pink@fluff
18-02-2005, 02:46 PM
excuse me it does :o www.freewebs.com/pinkshabbo i should know as I made it.

:Lively
18-02-2005, 04:04 PM
ok ok ,soz for accusing u


:(

-JT-
18-02-2005, 04:33 PM
yer, it was not bad :rolleyes:

pink@fluff
18-02-2005, 04:54 PM
yeah *not bad* rollz eyes lol dont worry i dont mind now

Want to hide these adverts? Register an account for free!