PDA

View Full Version : drag drop



squishy
March 28th, 2005, 11:03 AM
hi everybody I would like to know how to make my mouse be able throw the knife that he has in his belt by holding down the left mouse botton over the knife a then wip it and make it throw fast or slow depending on how fast the mouse is moving. can anybody help me:huh: ?

pomogranate
March 28th, 2005, 01:35 PM
No, because you spelled bottons wrong ;P

Joppe
March 28th, 2005, 01:39 PM
isnt that kind of the same graphics used in the Madness Combat game?

squishy
March 28th, 2005, 03:06 PM
uh...NO defenitly not! ;)

Joppe
March 28th, 2005, 04:36 PM
Lol :P .. Anyway back to the subject! have you tried using Gravity
this is an great tutorial on basic gravity and long way down there you can se about
drag and drop and the object fly.. is that anything you needed?
http://www.kirupa.com/developer/actionscript/gravity.htm

squishy
March 28th, 2005, 08:32 PM
thanx I'll try it :pleased:

squishy
March 28th, 2005, 09:23 PM
It works thanks :cubs:

eiefai
March 28th, 2005, 09:56 PM
hope you show the updated swf, i'd like to see it

squishy
March 28th, 2005, 10:33 PM
ok and do you want the fla.? :look:

Joppe
March 29th, 2005, 12:27 PM
Thats nice! now you must make so the knife stucks in the board.. :D

nessaja
March 29th, 2005, 01:19 PM
Hmmmmmm... Yes.. i would have 1 idea..
For example, do a simple hittest on a place on the board and stop the gravity and keep the knife where it is... Easy???
Cheersio
Nessaja*

Joppe
March 29th, 2005, 01:25 PM
Thats easy .. But is it possibly that when a object reaches a frame , a line in the code deletes?

squishy
March 29th, 2005, 05:17 PM
well that board is a representaion of a person

squishy
March 29th, 2005, 05:18 PM
Thats nice! now you must make so the knife stucks in the board.. :D stucks?

squishy
March 29th, 2005, 08:10 PM
I think the stick code would be like this

OnClipevent()
if.(throw_mc) HitTest.This = true
(throw_mc) gravity = 0

}

nessaja
March 31st, 2005, 08:05 PM
yeye.. that would be my first guess.
also... if it was supposed 2 be a person... example <>

opphealth == oppheath - 1

if u know what i mean... not very good but u know what i mean...
:)

cheersio
Nessaja*

squishy
April 1st, 2005, 11:15 AM
yep I understand ;)

colombianking
August 9th, 2005, 09:05 PM
I want the fla im making a game similar and having trouble can i see it

squishy
August 9th, 2005, 11:33 PM
um, there is one problem the folder with that fla. got deleated, not by me though :(

btw: what do you want from it? :)