AS2 q

Started by: doc | Replies: 4 | Views: 391

doc

Posts: 1,127
Joined: Jan 2009
Rep: 10

View Profile
Jan 30, 2009 3:40 PM #348553
ok. i have a movie clip and i want it to do something when the "b" button is down. i have the code number (66) but i cant figure out the syntax. ive tried about a dozen of them from the internet, and none of them worked. Any1 know? tx in advance
Scorpioxxx
2

Posts: 1,454
Joined: Apr 2006
Rep: 10

View Profile
Jan 30, 2009 5:42 PM #348636
if (Key.isDown(66)){
//When the key is down run the code in the brackets.
}
doc

Posts: 1,127
Joined: Jan 2009
Rep: 10

View Profile
Jan 30, 2009 6:17 PM #348659
but i tried that and it didn't work. idk mayb i just made a typo or somethin
Scorpioxxx
2

Posts: 1,454
Joined: Apr 2006
Rep: 10

View Profile
Jan 30, 2009 6:56 PM #348682
Works fine for me. Are you putting it in the 'onClipEvent' function, it needs to go in one if your putting it in a movieclip.
doc

Posts: 1,127
Joined: Jan 2009
Rep: 10

View Profile
Jan 30, 2009 6:59 PM #348683
o i got it. tx!