Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [LOCKED] Gr8 Codes i've created!

Author
Message
chris 123 smoothie
18
Years of Service
User Offline
Joined: 25th Feb 2007
Location:
Posted: 4th Apr 2007 10:43
I have created a few codes and ITS AMAZING i have found a code that can make a sprite move wen you use the directional keys!
Here it is:

onClipEvent (load) {
moveit = 10;
}
onClipEvent (enterFrame) {
if ((Key.isDown(Key.RIGHT))) {
this._x += moveit;
} else if ((Key.isDown(Key.LEFT))) {
this._x -= moveit;
}
if ((Key.isDown(Key.DOWN))) {
this._y += moveit;
} else if ((Key.isDown(Key.UP))) {
this._y -= moveit;
}
}

More gr8 codes coming soon!
(this code can be used on DBP, DBC and flash)
chris 123 smoothie
18
Years of Service
User Offline
Joined: 25th Feb 2007
Location:
Posted: 4th Apr 2007 10:43
I think so anyway
Tom J
20
Years of Service
User Offline
Joined: 4th Aug 2005
Location: Essex, England
Posted: 4th Apr 2007 11:25
Quote: "this code can be used on DBP, DBC "


It can't Something like this is DBP:



Visit GamingColosseum Web - http://www.gamingc.co.nr/
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 4th Apr 2007 11:36
I prefer gr9 codes to be honest.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 4th Apr 2007 11:49
Lol @ Benjamin! So casually sarcastic...reminds me of myself...

Well, um, I'd imagine that it would run in flash so 1 out of 3 isn't awful...

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 4th Apr 2007 15:41
This is a minimalist DBPro version.

moveit = 10

inc x,(rightkey()-leftkey())*moveit
dec y,(upkey()-downkey())*moveit


I think DBPro just pwnd Flash .


Good guy, Good guy, Wan...
Xenocythe
20
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 4th Apr 2007 20:34
I'd say Flash is a little bit more 'Hardcore' than DBPro. But DBPro is alot more functional, alot cheaper, and alot cooler.

-Mansoor
Zeus
19
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 5th Apr 2007 01:18
shouldn't people post only DB code here. not trolling jst curious.

Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th Apr 2007 09:48
Quote: "This is a minimalist DBPro version."

Clever! I don't know why I never thought of that...

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
JerBil
21
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 5th Apr 2007 21:21 Edited at: 5th Apr 2007 21:32
For the next compo...



Ad Astra Per Asper
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Apr 2007 00:00
I think if you use mousemove in that way, your object is gonna be flying like crazy around the screen.

JerBil
21
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 6th Apr 2007 00:10
Hence the small value for the multiplier, you wouldn't think it
would work, but it does.

Ad Astra Per Asper
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Apr 2007 22:23
I wondering if multiplying by a float is faster than dividing integers.

RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 11th Apr 2007 23:15
I think thats what occurs when division is done, it multiplies the numberbeing divided by by 0.1 and then multiplies this product by the original number.

Login to post a reply

Server time is: 2025-08-09 01:38:45
Your offset time is: 2025-08-09 01:38:45