Forum Topic: arrow keys...

(64 views • 8 replies)

This topic is 1 page long.

<< < > >>
None

biohasard

Reply To Post Reply & Quote

Posted at: 11/30/08 10:30 PM

biohasard NEUTRAL LEVEL 10

Sign-Up: 04/11/08

Posts: 1,189

how do i make a mc (spaceship) move when i use the arrow keys... im a little stuck in doing it every tutorial i have found it doesn't seem to work. please help!

Biohasard, Staying neutral since 2009!

BBS Signature

None

Polioman

Reply To Post Reply & Quote

Posted at: 11/30/08 10:32 PM

Polioman EVIL LEVEL 12

Sign-Up: 07/06/06

Posts: 314

At 11/30/08 10:30 PM, biohasard wrote: how do i make a mc (spaceship) move when i use the arrow keys... im a little stuck in doing it every tutorial i have found it doesn't seem to work. please help!

your MC does not have an instance name


None

biohasard

Reply To Post Reply & Quote

Posted at: 11/30/08 10:33 PM

biohasard NEUTRAL LEVEL 10

Sign-Up: 04/11/08

Posts: 1,189

At 11/30/08 10:32 PM, Polioman wrote:
At 11/30/08 10:30 PM, biohasard wrote: how do i make a mc (spaceship) move when i use the arrow keys... im a little stuck in doing it every tutorial i have found it doesn't seem to work. please help!
your MC does not have an instance name

... ? what does that have to do with anything?

Biohasard, Staying neutral since 2009!

BBS Signature

None

Alpharius120

Reply To Post Reply & Quote

Posted at: 11/30/08 10:35 PM

Alpharius120 FAB LEVEL 14

Sign-Up: 07/08/07

Posts: 2,985

At 11/30/08 10:33 PM, biohasard wrote: ... ? what does that have to do with anything?

Your instance name is how the AS identifies the MC.

BBS Signature

None

CrustySheet

Reply To Post Reply & Quote

Posted at: 11/30/08 10:36 PM

CrustySheet LIGHT LEVEL 03

Sign-Up: 05/03/06

Posts: 534

At 11/30/08 10:30 PM, biohasard wrote: how do i make a mc (spaceship) move when i use the arrow keys... im a little stuck in doing it every tutorial i have found it doesn't seem to work. please help!

give the mc an instance name Spaceship (to do this select the MC and in the prroperties it says instance name)

then select the frame on the main timeline and press f9 and type

var Speed:Number = 5;
onEnterFrame = function(){

spaceship._x += Key.isDown(Key.RIGHT)*speed;
spaceship._x -= Key.isDown(Key.LEFT)*speed;
spaceship._y += Key.isDown(Key.DOWN)*speed;
spaceship._y -= Key.isDown(Key.UP)*speed;
}

None

biohasard

Reply To Post Reply & Quote

Posted at: 11/30/08 10:36 PM

biohasard NEUTRAL LEVEL 10

Sign-Up: 04/11/08

Posts: 1,189

At 11/30/08 10:35 PM, Alpharius120 wrote:
At 11/30/08 10:33 PM, biohasard wrote: ... ? what does that have to do with anything?
Your instance name is how the AS identifies the MC.

yeah i know that but what does that have to do with asking people to link me to tutorials? once i see the tutorial and it tells me to give it an instant name i would...

Biohasard, Staying neutral since 2009!

BBS Signature

None

biohasard

Reply To Post Reply & Quote

Posted at: 11/30/08 10:40 PM

biohasard NEUTRAL LEVEL 10

Sign-Up: 04/11/08

Posts: 1,189

im sorry that's not working did i mention my mc is a triangle so i think that has something to do with it when i use it it gives it that choppy look that im trying to avoid... please help.

Biohasard, Staying neutral since 2009!

BBS Signature

None

CrustySheet

Reply To Post Reply & Quote

Posted at: 11/30/08 10:42 PM

CrustySheet LIGHT LEVEL 03

Sign-Up: 05/03/06

Posts: 534

At 11/30/08 10:40 PM, biohasard wrote: im sorry that's not working did i mention my mc is a triangle so i think that has something to do with it when i use it it gives it that choppy look that im trying to avoid... please help.

oh yeah triangles defiently make it harder to work with :)

whats your frame rate set at?


Goofy

jesseRYU

Reply To Post Reply & Quote

Posted at: 11/30/08 10:42 PM

jesseRYU EVIL LEVEL 10

Sign-Up: 02/17/07

Posts: 1,304

Well if you have the code down from the tutorial you should do like everyone is saying and check the instance name on your MC. so if the code calls your MC say "Ship" click on your MC and make sure you instance is "Ship" and not "ship" or whatever. If you looking for tutorials though just go above in the search bar by the newgrounds banner and type in tutorials.

New at flash then get some help.

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 10:45 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!