Forum Topic: AS: press 2 buttons same time

(328 views • 7 replies)

This topic is 1 page long.

<< < > >>
None

D-SuN

Reply To Post Reply & Quote

Posted at: 10/16/05 10:24 PM

D-SuN NEUTRAL LEVEL 14

Sign-Up: 01/04/04

Posts: 128

eyz,
could someone help me out? i want need the script for pressing 2 buttons at the same time (if there is).
ive tryed things like
on (keyPress "x" && "z") {

and

on (keyPress "x", "z") {

n stuff liek that.
thanx


None

fwe

Reply To Post Reply & Quote

Posted at: 10/16/05 10:26 PM

fwe DARK LEVEL 08

Sign-Up: 07/24/03

Posts: 3,372

onClipEvent(enterFrame) {
if(Key.isDown("X".charCodeAt() && Key.isDown("Z".charCodeAt()){
}
}

wtfbbqhax


None

BUDD-SMOKE-ER

Reply To Post Reply & Quote

Posted at: 10/16/05 10:26 PM

BUDD-SMOKE-ER NEUTRAL LEVEL 04

Sign-Up: 09/29/05

Posts: 91

hmm i didnt know you could use x & z

dont each letter have a code??
like numbers

z would be 90

and x would be 87
???????


None

ImpotentBoy2

Reply To Post Reply & Quote

Posted at: 10/17/05 12:23 AM

ImpotentBoy2 LIGHT LEVEL 18

Sign-Up: 04/01/03

Posts: 5,039

charCodeAt() gets that little number for you, i still prefer just getting the numbers


None

Toast

Reply To Post Reply & Quote

Posted at: 10/17/05 04:56 AM

Toast DARK LEVEL 09

Sign-Up: 04/02/05

Posts: 8,414

Next time you want AS help, don't name your thread "AS:", these are Actionscript tutorials :P

I put on my robe and wizard hat

Why don't you check out my check out my userpage?

BBS Signature

None

orb

Reply To Post Reply & Quote

Posted at: 10/17/05 12:02 PM

orb EVIL LEVEL 17

Sign-Up: 05/01/03

Posts: 3,893

At 10/16/05 10:26 PM, fwe wrote: onClipEvent(enterFrame) {
if(Key.isDown("X".charCodeAt() && Key.isDown("Z".charCodeAt()){
}
}

doesn't it have to be

if(Key.isDown("X".charCodeAt()) and so on?

doesn't it need a second close parentheses?

Fuck. No more animated sigs. Suck my left testicle.

BBS Signature

None

dELtaluca

Reply To Post Reply & Quote

Posted at: 10/17/05 12:15 PM

dELtaluca LIGHT LEVEL 20

Sign-Up: 04/16/04

Posts: 5,117

At 10/17/05 12:02 PM, TwinsenDude wrote:
At 10/16/05 10:26 PM, fwe wrote: onClipEvent(enterFrame) {
if(Key.isDown("X".charCodeAt() && Key.isDown("Z".charCodeAt()){
}
}
doesn't it have to be

if(Key.isDown("X".charCodeAt()) and so on?

doesn't it need a second close parentheses?

yeh it does need the second parenthesis, hes just silly

My social worker says im special!

BBS Signature

None

fwe

Reply To Post Reply & Quote

Posted at: 10/17/05 04:12 PM

fwe DARK LEVEL 08

Sign-Up: 07/24/03

Posts: 3,372

Beh, that's what happens when you write code on the BBS

wtfbbqhax


All times are Eastern Standard Time (GMT -5) | Current Time: 11:37 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!