Home Tutorials Forums Articles Blogs Movies Library Employment Press
Prev Previous Post   Next Post Next
Old 03-25-2003, 09:58 AM   #1
Registered User
Shashank's Avatar
Join Date: Mar 2003
Posts: 84
Question Key Capture

Iam using the following command...to capture the key and move the object,
now i want to move it only on certain area,
for now its moving out of the scen,

i want to restrict it to certain area.

the code i use on the movie clip to move is onClipEvent (keyDown) {
if (Key.isDown(key.LEFT)) {
_x -= 4;
onClipEvent (keyDown) {
if (Key.isDown(key.RIGHT)) {
_x += 4;
onClipEvent (keyDown) {
if (Key.isDown(key.UP)) {
_y -= 4;
onClipEvent (keyDown) {
if (Key.isDown(key.DOWN)) {
_y += 4;

can some one help in this


Shashank is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:01 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.