Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: Moving As That's Not In As Main

(181 views • 11 replies)

This topic is 1 page long.

<< < > >>
None

TacoFreak

Reply To Post Reply & Quote

Posted at: 10/15/06 01:29 PM

TacoFreak LIGHT LEVEL 24

Sign-Up: 07/27/05

Posts: 3,168

I need some As that to move someone you have to press: left,right,left,right,left,right,
where you have to press alterevly (is that what it's called?).

Tacos = LIFE <3
My homeboy RobotTaco
Please post in my blog :3

BBS Signature

None

TacoFreak

Reply To Post Reply & Quote

Posted at: 10/15/06 01:43 PM

TacoFreak LIGHT LEVEL 24

Sign-Up: 07/27/05

Posts: 3,168

Anyone!

Tacos = LIFE <3
My homeboy RobotTaco
Please post in my blog :3

BBS Signature

None

Cybex

Reply To Post Reply & Quote

Posted at: 10/15/06 01:47 PM

Cybex NEUTRAL LEVEL 20

Sign-Up: 03/04/05

Posts: 7,746

Try something like this:

onClipEvent (load) {
left = true;
}
onClipEvent (enterFrame) {
if (left) {
if (Key.isDown(Key.LEFT)) {
_x += 5;
left = false;
}
} else {
if (Key.isDown(Key.RIGHT)) {
_x += 5;
left = true;
}
}
}


None

TacoFreak

Reply To Post Reply & Quote

Posted at: 10/15/06 01:49 PM

TacoFreak LIGHT LEVEL 24

Sign-Up: 07/27/05

Posts: 3,168

Ok but i need it to look like its moving, like a legs moving too.

Tacos = LIFE <3
My homeboy RobotTaco
Please post in my blog :3

BBS Signature

None

jmtb02

Reply To Post Reply & Quote

Posted at: 10/15/06 01:51 PM

jmtb02 LIGHT LEVEL 29

Sign-Up: 03/01/04

Posts: 5,461

That's a simple matter of using gotoAndPlay's within the code given. Does that make sense?

NOM NOM NOM NOM NOM

BBS Signature

None

TacoFreak

Reply To Post Reply & Quote

Posted at: 10/15/06 01:55 PM

TacoFreak LIGHT LEVEL 24

Sign-Up: 07/27/05

Posts: 3,168

At 10/15/06 01:51 PM, jmtb02 wrote: That's a simple matter of using gotoAndPlay's within the code given. Does that make sense?

I don't know how to do that :(

Tacos = LIFE <3
My homeboy RobotTaco
Please post in my blog :3

BBS Signature

None

Cybex

Reply To Post Reply & Quote

Posted at: 10/15/06 01:56 PM

Cybex NEUTRAL LEVEL 20

Sign-Up: 03/04/05

Posts: 7,746

At 10/15/06 01:55 PM, tacofreak wrote:
At 10/15/06 01:51 PM, jmtb02 wrote: That's a simple matter of using gotoAndPlay's within the code given. Does that make sense?
I don't know how to do that :(

In that case, i think you should learn actionscript before you attempt to make a game. Get a book on actionscript or find some tutorials for beginners. Start really basic and work your way up. You can't attempt to learn AS by making a game. It doesn't work that way.


None

Mag-got

Reply To Post Reply & Quote

Posted at: 10/15/06 02:00 PM

Mag-got NEUTRAL LEVEL 08

Sign-Up: 09/17/06

Posts: 302

For example

onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
_root.MC.gotoAndPlay(2);
}
}

I bet that doesn't make any sense either, but gotoAndPlay(2); is the frame it will play. _root.MC is the movie clip's instance it will play. If you don't know this either, then I suggest you go read tutorials.


None

TacoFreak

Reply To Post Reply & Quote

Posted at: 10/15/06 02:01 PM

TacoFreak LIGHT LEVEL 24

Sign-Up: 07/27/05

Posts: 3,168

At 10/15/06 02:00 PM, Mag-got wrote: For example

onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
_root.MC.gotoAndPlay(2);
}
}

I bet that doesn't make any sense either, but gotoAndPlay(2); is the frame it will play. _root.MC is the movie clip's instance it will play. If you don't know this either, then I suggest you go read tutorials.

I understand! But I must ask, what does this "root" mean that you speak of?

Tacos = LIFE <3
My homeboy RobotTaco
Please post in my blog :3

BBS Signature

None

Cybex

Reply To Post Reply & Quote

Posted at: 10/15/06 02:05 PM

Cybex NEUTRAL LEVEL 20

Sign-Up: 03/04/05

Posts: 7,746

At 10/15/06 02:01 PM, tacofreak wrote: I understand! But I must ask, what does this "root" mean that you speak of?

root reffers to the main timeline. As the mc is on the main timeline, you can reffer to it as _root.mc. If you wanted to reffer to an mc which is inside that one, you'd reffer to it as _root.mc1.mc2


None

Fion

Reply To Post Reply & Quote

Posted at: 10/25/06 04:20 AM

Fion DARK LEVEL 28

Sign-Up: 08/21/05

Posts: 2,037

At 10/15/06 01:47 PM, Jesus wrote: Try something like this:

Out of curiousity, what would happen if both keys were pressed down, would it not do anything or would it just move along smoothly?

.

BBS Signature

None

Fion

Reply To Post Reply & Quote

Posted at: 10/25/06 04:22 AM

Fion DARK LEVEL 28

Sign-Up: 08/21/05

Posts: 2,037

Argh sorry! didnt mean to bump and old thread. Didnt realise where I was.

.

BBS Signature

All times are Eastern Daylight Time (GMT -4) | Current Time: 11:31 PM

<< 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!