Solved

add event leastener for keyboard event spacebar

Posted on 2009-05-18
1
304 Views
Last Modified: 2013-11-11
The case Keyboard.UP will execute if I press the up arrow in my kyboard. what should I write if I want to press the spacebarr for example. should it be somehting like case SpaceBar?

function Degree(event:KeyboardEvent):void
{
switch(event.keyCode)
{
case Keyboard.UP :
rd();
break;
case Keyboard.DOWN :
ld();
break;
default :
break;
}
}
0
Comment
Question by:TonoNam
1 Comment
 
LVL 22

Accepted Solution

by:
rascalpants earned 125 total points
ID: 24416650
use Keyboard.SPACE


rp / ZA
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SWF won't scale? 4 523
WMV file has abnormal script stream which may cause production problems. 7 748
Google Chrome Blank White Screens 13 299
Failed download 57 563
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question