Flash WOLF

Learn Flash Together!
 
HomeFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Easy Arrowed Control!

Go down 
AuthorMessage
DDWOLFER
Admin


Posts : 4
Join date : 2008-07-15
Location : On an island! duh!

PostSubject: Easy Arrowed Control!   Tue Jul 15, 2008 7:59 am

Hey,

This is going to teach you how to move a movieclip using the arrow keys.

First to start off make the object you want to move, I guess thats what you would call it. Then highligth the object and press F8 and name it what ever you want, I named mine "chara_cnt" with out the quotes. Once you do that highlight the object again and press F9 to bring up Action Script 2.0, and copy and paste this code.

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


Then test out the movie by pressing Ctrl and Enter at the same time. It should work. If you have a question just post it here.

Thanks, Smile
DDWOLFER
Back to top Go down
View user profile http://flashwolf.forumotion.com
 
Easy Arrowed Control!
Back to top 
Page 1 of 1
 Similar topics
-
» Selenium Remote Control misbehaves
» How to disable Remote Control page popping up?
» Gplex MobileDialer in Oman&KSA/Easy Payment Option Available
» Suggestions for easy non cook party food please.
» To pick current date from calender control in selenium ide.

Permissions in this forum:You cannot reply to topics in this forum
Flash WOLF :: Flash CS3 Pro :: ActionScript 2.0-
Jump to: