Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

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

Superium

Age/Gender: n/a, Male
Location: England, Corby
Job: Student

Newgrounds Stats

Sign-Up Date:
4/18/08

Level: 5
Aura: Fab

Rank: Civilian
Blams: 9
Saves: 13
Rank #: 101,980

Whistle Status: Normal

Exp. Points: 210 / 280
Exp. Rank #: 130,524
Voting Pow.: 4.23 votes

BBS Posts: 6 (0.04 per day)
Flash Reviews: 15
Music Reviews: 0
Trophies: 0
Stickers: 0

Entry #2

Jump to Entry: [ 1 | 2 | 3 | 4 | 5 ]


Superium

AHH!

Posted by Superium May. 25, 2008 @ 10:28 AM EDT

On My Project With No Name (LOL) I Need Some AC Help :(

I Have Drawn A Up And Down Hill Sloping Ground, My Problem Is When I Make My Character Move Up It He Just Walks Into It, And Then When I Tell Him To Jump, He Appears Ontop Of The Ground He is Inside.

Any Advise // Actionscipt Problems?

My Characters Actionscript Is:

onClipEvent (load) { moveSpeed = 10;}onClipEvent (enterFrame) { if (Key.isDown(Key.RIGHT)) { this._x += moveSpeed; } else if (Key.isDown(Key.UP)) { this._y -= 0; } else if (Key.isDown(Key.DOWN) && !fall) { this._y += 0; } else if (Key.isDown(Key.LEFT)) { this._x -= moveSpeed; }}onClipEvent (enterFrame) { if (Key.isDown(Key.SPACE) && !jumping) { vel_y = 36; jumping = true; } if (jumping == true) { vel_y -= 2; if (vel_y<=-15) { vel_y = -15; } this._y -= vel_y; } if (_root.ground.hitTest(this._x, this._y+35, true)) { vel_y = 0; jumping = false; }}onClipEvent (enterFrame) { this._y += 16; if (_root.ground.hitTest(this._x, this._y+1, true)) { this._y -= 16; }}

And My Ground Simpally Uses A Instance Named ground

Any Suggestions?

Alex

Log in to comment! | Share this!

The People Have Spoken

1 Comment

May. 25, 2008 | 11:33 AM ngfan14 says:

I'm going to steal your actionscript. :P
I would help you but I don't know anything about flash. Good luck.

May. 25, 2008 | 4:17 PM Superium responds:

Lol :)

Jump to Entry: [ 1 | 2 | 3 | 4 | 5 ]