00:00
00:00
Newgrounds Background Image Theme

Someone gifted MetalSlayer69 supporter status!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

I am trying to make a player change to a running and shooting animation when the spacebar is down and they are moving


onClipEvent (load) {

var ground:MovieClip = _root.ground;

var grav:Number = 0;

var gravity:Number = 2;

var speed:Number = 28;

var maxJump:Number = -24;

var CrouchLeap:Number = 42;

var touchingGround:Boolean = false;

scale = _xscale;

}

onClipEvent (enterFrame) {

_y += grav;

grav += gravity;

while (ground.hitTest (_x, _y, true))

{

_y -= gravity;

grav = 0;

}

if (ground.hitTest (_x, _y + 5, true))

{

touchingGround = true;

}

else

{

touchingGround = false;

}

if (Key.isDown (Key.LEFT))

{

_xscale = -scale;

_x -= speed;

this.gotoAndStop (2);

}

if (Key.isDown (Key.RIGHT))

{

_xscale = +scale;

_x += speed;

this.gotoAndStop (2);

}

if (Key.isDown (Key.SPACE))

{

this.gotoAndStop (5);

}

if (Key.isDown (Key.UP) && touchingGround)

{

grav = maxJump;

this.gotoAndStop (3);

}

if (Key.isDown (Key.DOWN) && touchingGround)

{

this.gotoAndStop (4);

}

if (ground.hitTest (_x + (_width / 2), _y - (_height / 2), true))

{

_x -= speed;

}

if (ground.hitTest (_x - (_width / 2), _y - (_height / 2), true))

{

_x += speed;

}

if (ground.hitTest (_x, _y - (height), true))

{

grav = 3;

}

if (_root.vcam.hp._currentframe == 101)

{

speed = 0;

maxJump = 0;

this.gotoAndStop (6);

}

}

onClipEvent (keyUp) {

this.gotoAndStop (1);

}


this is the code, it is in actionscript 2


every single featured game is pixel art for some reason, people can make their games however they want but i just wish there was more variety, sorry if what i say comes off as rude towards the artists

Response to: hey umm my fla is too big Posted October 7th, 2022 in Animation

yes i am

Response to: hey umm my fla is too big Posted October 6th, 2022 in Animation

i managed to get it working so uh, cool

Response to: BRING BACK THE MUSIC TO PORTAL!!! Posted September 18th, 2022 in General

do you happen to have the song fast and chaotic by LHM

Response to: Has someone made a Pico's School Iceberg video yet? Posted July 31st, 2022 in General

why shouldnt i research pico_beta.swf

Response to: Has someone made a Pico's School Iceberg video yet? Posted July 31st, 2022 in General

what is pico_beta.swf

Response to: hey umm my fla is too big Posted April 11th, 2022 in Animation

it woeked

Response to: hey umm my fla is too big Posted April 10th, 2022 in Animation

Oh ok thanks mate I appreciate fella

hey umm my fla is too big Posted April 10th, 2022 in Animation

my fla file is too big and i have NO IDEA why, if anyone thinks they know the issue please tell me

https://drive.google.com/file/d/1GrGqw6pQD9aODT4EHbZ0bIOLNo65FZL_/view?usp=sharing

Response to: My fla file is brocken Posted January 14th, 2022 in Programming

ogm, thanks so much, even though the actual animation isnt there this still saved me a lot of time

Response to: My fla file is brocken Posted January 14th, 2022 in Programming

yuyou can delet thanks

Response to: My fla file is brocken Posted January 14th, 2022 in Programming

i do have cs5.5

Response to: My fla file is brocken Posted January 14th, 2022 in Programming

still trying to figure that out

Response to: My fla file is brocken Posted January 14th, 2022 in Programming

also any time i try to click on anything in the library flash crashes, is there any other way to access symbols? cause all my lipsync and stuff is in those symbols

Response to: My fla file is brocken Posted January 14th, 2022 in Programming

aw, seriously

My fla file is brocken Posted January 13th, 2022 in Programming

every time i try to access it i just get a blank stage, nothing in the timeline, and a glitched scrollbar

https://drive.google.com/file/d/10CSU8TnyJ5J25HBiw-dUf0uxsMBS7tOQ/view?usp=sharing

iu_523493_8074227.webpand when i click on something it crashes

Response to: Secret Santa 2021! Posted November 9th, 2021 in Art

oh tidlywink oh barji oh pastry oh stress oh desert oh pudding oh tortilla

Response to: Secret Santa 2021! Posted November 9th, 2021 in Art

iu_467240_8074227.png

Response to: I need as2 help Posted October 26th, 2021 in Programming

thank you for the help, I cant believe i didnt think of that

Response to: I need as2 help Posted October 24th, 2021 in Programming

i do have a 4 direction movement script but i want 4 other positions for the diagonal movement aswell:

onClipEvent (enterFrame) {

speed = 20;

if (Key.isDown (Key.RIGHT))

{

this.gotoAndStop (7);

_x += speed;

}

if (Key.isDown (Key.LEFT))

{

this.gotoAndStop (3);

_x -= speed;

}

if (Key.isDown (Key.DOWN))

{

this.gotoAndStop (1);

_y += speed;

}

if (Key.isDown (Key.UP))

{

this.gotoAndStop (5);

_y -= speed;

}

I need as2 help Posted October 24th, 2021 in Programming

does anyone know how to make a movement script that lets a character be viewed at 8 different angles in as2, if you do please tell me where you learned it cause i am new to as2, i have tried making games before but those where just tests

i also want to know how to make a character shoot with this code

Response to: YouTube animators vs Newgrounds animators Posted October 9th, 2021 in Animation

mondo mini shows is basically the edgyness of newgrounds on youtube

Response to: YouTube animators vs Newgrounds animators Posted October 9th, 2021 in Animation

newgrounds because youtube doesnt have a judgeent system,

the reason that newgrounds animators dont get critisized as much is because of the judgement feature

Response to: Which version of Flash is the best? Posted October 9th, 2021 in Animation

i like the macromedia ones, even though i was never around when macromedia owned flash it still feels oddly nostalgic to me

i also like cs3

Response to: The wavy shaky line effect thing Posted October 9th, 2021 in Animation

if you use flash you can use the smoothing button

Response to: Clockday prizes! Posted August 2nd, 2021 in General

when's lock day

Response to: Newgrounds vs. Youtube Posted May 19th, 2021 in General

i was just saying that i like how spam cant survive on here

Response to: Newgrounds vs. Youtube Posted May 19th, 2021 in General

at least content gets blammed here

Response to: how do i make random spawning Posted May 17th, 2021 in Programming

thank you so so much