PDA

View Full Version : How do you drag an object to a certain place



zainx
13-03-2005, 06:14 PM
I no there are many ways in draging images but i want to do it so theres a certain place it can go,

NOT like this http://www.dynamicdrive.com/dynamicindex4/image3.htm

ideabox
13-03-2005, 06:40 PM
Im not sure what your saying. What do you mean? HTML coding?

zainx
13-03-2005, 06:45 PM
well like habbo u can only move furni onto the squares and if u put it just of it still goes to it, but like the game on habbox when u drag an pice of clothing u can get it of a bit, but i dont want it to,

u get me now


like www.citycreator.com i want to do it like that

LittleFish
13-03-2005, 06:46 PM
he means so when u drag the object it can only go in a certain place not anywere, like over text ect..

Edit : Opps We both posted at same time

ideabox
13-03-2005, 06:48 PM
well like habbo u can only move furni onto the squares and if u put it just of it still goes to it, but like the game on habbox when u drag an pice of clothing u can get it of a bit, but i dont want it to,

u get me now


like www.citycreator.com i want to do it like that
I see. Thanks about that. I only know in Flash coding. Not really a HTML expert.

zainx
13-03-2005, 06:50 PM
oh ok :( any 1 no

iRoss
13-03-2005, 07:14 PM
You meen like draggable layers?

-JT-
13-03-2005, 07:14 PM
that can only be done in flash

Mentor
13-03-2005, 07:32 PM
i think i may have seen somthing like this before, by crating paramites inside of another layer or somthing, athogh i cnat actaly rember how this was achived.

But for ease flash would be your best bet as james said

iRoss
13-03-2005, 07:43 PM
Oo didn't kirk do that? that room game with the fridge where it was in the hand, u clicked it, then clicked on a square in the room and it appeared there? :o

Mentor
13-03-2005, 07:45 PM
www.citycreator.com is doing it somehow so it must be posible, athogh how its done i dont yet know :/

zainx
13-03-2005, 07:47 PM
well i was talking to the owner, asking how much it was to set it up ect, and if i was to buy it how much but it costs over £5000 lol so i dont think i will, but on the faq page it says they used ecma or something, but when i searched google and downloaded it, it was 188 pages long and i didnt understand none of it

Mentor
13-03-2005, 07:52 PM
by the looks of it they must be some sort of coding company, and web design and coding tends to cost alot, esply for cutsom scripts. Alos from the looks of the js, thats some seriosly advnaced javascript.

Kirk
15-03-2005, 05:16 AM
Oo didn't kirk do that? that room game with the fridge where it was in the hand, u clicked it, then clicked on a square in the room and it appeared there? :o

Yeah, I made that. I would be able to make that one, but my PC completely died when I tried to reinstall Windows XP, so I no longer have any of the scripts (I have them on the drive, which works, but I have no PC to put them in, the one I am currently using has no empty HD slots).


that can only be done in flash

It would be possible to make it using LINGO (Director MX). One way would to state all the possible points (x,y) and then make the script see where the click was located, if it was on a point, move object A to location B, if the click wasn't on a point, move the object back to its original point.

Homesrfan
15-03-2005, 12:49 PM
You have to have it in Dynamic Drive if you want it like that.
You just put an image that isn't draggable. And you just code the other images.

iRoss
15-03-2005, 03:24 PM
thats what i thought, cus u wouldnt want the object u are moving 2 would u ... brains xD its just the normal code but with a non-moving image, and make sure the image is at the back of the page so al of the draggable images dont go behind it

-JT-
15-03-2005, 04:06 PM
by the looks of it they must be some sort of coding company, and web design and coding tends to cost alot, esply for cutsom scripts. Alos from the looks of the js, thats some seriosly advnaced javascript.

i recon that for the most part it will be external JS. There is no way you woulkd find anything like that on javascripts.com xD

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