00:00
00:00
Newgrounds Background Image Theme

Coolgamer2000s just joined the crew!

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!

Actionscript codes here!

390,037 Views | 7,981 Replies
New Topic

Response to Actionscript codes here! 2003-06-22 06:56:58


feel free to ask anything!

Keep posting

(click my profile)

- EviLudy


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-06-22 06:58:00


hey guys i need some help with my game.
check out the thread i just started for more info.


BBS Signature

Response to Actionscript codes here! 2003-06-22 07:00:17


Ok ill check the tread, but post your questions here, OK? Then Ill check it inmeadiatly.

(Ill post the awnser here)


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-06-22 07:04:33


youve asked it before, but i think the 1st one is better (no color changes and actual scrolling)


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-06-22 07:05:28


At 6/22/03 07:00 AM, eviLudy wrote: Ok ill check the tread, but post your questions here, OK? Then Ill check it inmeadiatly.

(Ill post the awnser here)

well you'll see why i didnt post it here wen u see what it is.


BBS Signature

Response to Actionscript codes here! 2003-06-22 07:07:00


At 6/22/03 07:04 AM, eviLudy wrote: youve asked it before, but i think the 1st one is better (no color changes and actual scrolling)

i know i asked that already but now i have examples.
and as for the graphics they were just quick things i did for testing so the actual game will be better.


BBS Signature

Response to Actionscript codes here! 2003-06-22 12:52:13


he evilludy waar ben je where are you... i need more as help c'mon man!!!!!!!

Response to Actionscript codes here! 2003-06-22 13:43:27


Anyone know where I can get that Newgrounds preloader script, or any preloader script for that matter? Thanks.

~Spider

Response to Actionscript codes here! 2003-06-22 13:47:36


At 6/22/03 01:43 PM, Spider_X wrote: Anyone know where I can get that Newgrounds preloader script, or any preloader script for that matter? Thanks.

~Spider

well, just download the NG preloader and then look at the script in it. That script is about the same script everyone posts around here. Just use it but put it on something different. If you want more try going here. That is the rough version of the FAQ that me and PikaExploder are making so go there and towards the bottom is explained how to make preloaders. Good luck

-Star_Cleaver


I could surely die

If I only had some pie

Club-a-Club Club, son

BBS Signature

Response to Actionscript codes here! 2003-06-22 13:57:26


How do I make it so that my character will always be on the ground like he can jumpp aswell and stuff but if i go over a cliff I'll fall.


BBS Signature

Response to Actionscript codes here! 2003-06-22 13:58:16


Ah crap. The tutorials. I completely forgot. Sorry about that. I will have them to you by tommorrow.

Response to Actionscript codes here! 2003-06-22 14:11:19


At 6/22/03 01:57 PM, denacioust wrote: How do I make it so that my character will always be on the ground like he can jumpp aswell and stuff but if i go over a cliff I'll fall.

well, just use Fargate's jumping script and make your MC "ground" into a cliff but don't make it extend all the way across the stage. Than put this on your guy:

onClipEvent (load){
vel_y = 0;
jumping = false;
}
onClipEvent ( enterFrame){
if (Key.isDown(Key.SPACE) && !jumping) {
vel_y =20;jumping = true;}
if (jumping == true) {
vel_y -=1;
if ( vel_y <=-10){ vel_y=-10;}
this._y -= vel_y;}
if (_root.ground.hitTest (this._x,this._y+27,true))
{vel_y = 0; jumping = false;}
}

make sure to give the ground MC the instance name "ground".

Its amazing, Fargate hasn't been here forever and yet his scripts will live on forever.


I could surely die

If I only had some pie

Club-a-Club Club, son

BBS Signature

Response to Actionscript codes here! 2003-06-22 14:14:49


At 6/22/03 01:58 PM, PikaExploder wrote: Ah crap. The tutorials. I completely forgot. Sorry about that. I will have them to you by tommorrow.

doin't worry about it. There's no rush. I'm even thinking of adding more stuff to it. It'll be my side project. I'll just continually add to it. But maybe if you could get on AIM later today than we could talk about it more, okay.


I could surely die

If I only had some pie

Club-a-Club Club, son

BBS Signature

Response to Actionscript codes here! 2003-06-22 14:16:09


Oops ive been gone for a while, was busy with my game... It is now in the portal! Criminality V2~ Onfortuneatly there was a bug and ppl voted 0... but I fixed the bug. Now I can only pray people vote higher.

It stands only 3.40 now...


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-06-22 14:20:20


At 6/22/03 02:14 PM, Star_Cleaver wrote: doin't worry about it. There's no rush. I'm even thinking of adding more stuff to it. It'll be my side project. I'll just continually add to it. But maybe if you could get on AIM later today than we could talk about it more, okay.

Great! I'll have to catch you on MSN messenger though. AIM's at my dad's house and he's in Wisconsin for a while. :(

Response to Actionscript codes here! 2003-06-22 15:13:36


hey ppl how do i make my character go left when i press left and use the good animation the same for right! plz help i tried another script but that one had errors!

Response to Actionscript codes here! 2003-06-22 15:21:49


At 6/22/03 03:13 PM, Russian_Mobster wrote: hey ppl how do i make my character go left when i press left and use the good animation the same for right! plz help i tried another script but that one had errors!

onClipEvent (keyUp) {
_root.walk.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_root.walk.play();
_root.walk._x -= 15;
_root.walk._xscale=100
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_root.walk.play();
_root.walk._x += 15;
_root.walk._xscale = -100;
}
}

name yoru MC of your guy walking, "walk" and then inside the MC on frame 1 put a stop() command and then on the last frame of the actual walking animation put

gotoAndPlay(2);

assuming 2 is the first frame of your walking sequence.

hope that helps

-Star_Cleaver


I could surely die

If I only had some pie

Club-a-Club Club, son

BBS Signature

Response to Actionscript codes here! 2003-06-22 15:26:16


ok i am going to check this post out in about 17 hours cause i am going to bed and tomorrow i need to go to school... plz give me a script for my earlier post

Response to Actionscript codes here! 2003-06-22 15:26:49


Thanks star cleaver, and while I'm here, I may as well get another question answered:

Movie Clip= ?

Can I make my own movie clip using flash? Eg. make a bouncing ball tween, turn it into a movie clip and use it in my preloader? What exactly is a movie clip and how do you amke it??

Sorry for the newb question, btu I gotta know!

Response to Actionscript codes here! 2003-06-22 15:57:09


At 6/22/03 03:26 PM, Spider_X wrote: Thanks star cleaver, and while I'm here, I may as well get another question answered:

Movie Clip= ?

Can I make my own movie clip using flash? Eg. make a bouncing ball tween, turn it into a movie clip and use it in my preloader? What exactly is a movie clip and how do you amke it??

Sorry for the newb question, btu I gotta know!

well, if you would look in that FAQ somewhere its in there. I'll even quote from it so you don't have to look through it.=)

"What are symbols Symbols are your best friend in Flash. They are drawings that you have made that can be used over and over again without having to redraw them. They are found in the library. As a rule of thumb, if you use a picture more than once in a movie, like a background, then make it a symbol. It will help reduce your filesizes in the end.

Types of Symbols Graphic: These are the basic symbols. They are static images of your drawing.
Movie Clips:These are symbols that have timelines inside of the MAIN timeline. And these timelines run independently of the main timeline. So if the main timeline is stopped, this object will keep playing. They are also necessary for AS.
Buttons:These are exactly what the name says, they are buttons that you can click. They are pretty worthless unless you have some actions attached to them. These are different then the other two symbols. Because if you right-click you button instance on the stage and go to edit, you will see that it has four frames, labeled "UP", "OVER" ,"DOWN", and "HIT". The UP frame is what the button will look like when you aren't hovering the mouse over it. The OVER frame is what the button will look like when you have the mouse over the button. They DOWN frame is what the button will look like when you click it. and The HIT frame is the actual area of the button that is active and will read the mouses. so if you have a big square and the hit frame is a circle, the button will only read the mouses presence over the circle part. The HIT frame is also not visible at all. so don't worry about making it look good. Also, if you only have a HIT frame for a button, the button will be invisible. It will appear a transparent blue color on the stage but won't be seen in the final project."


I could surely die

If I only had some pie

Club-a-Club Club, son

BBS Signature

Response to Actionscript codes here! 2003-06-22 17:21:10


how do you use actionscript for sound?

Response to Actionscript codes here! 2003-06-22 18:15:55


Not ot drag this off topic, but all you guys (especially star_cleaver) have been really helpful. Please let me know or email your FAQ qhen its done to spider_x131@hotmail.com.

Thanks, I'll let ya know when I have more questions :)

~Spider

Response to Actionscript codes here! 2003-06-22 21:01:58


At 6/22/03 12:30 AM, Star_Cleaver wrote:
At 6/22/03 12:24 AM, Freek_Sk8er wrote:
ummmm, make the code yourself *shrug*

just use some simple logic and i'm sure you'll think of something. just use the position of you enemy and then if your "good guy" is within a certain distance of your enemy, the enemy goes into a "fight" state of some sort. I have faith that you can figure it out from there, cuz i'm tired and am going to bed and i don't want to explain a lot of stuff right now. have fun

Well wtf do you think I've been trying, I can get it to work, it just doesnt look right, if you come close to him and he goes to the fight seen he just does one thing, but I need him to follow you around and attack you, thats just hard.

Response to Actionscript codes here! 2003-06-22 21:05:57


At 6/22/03 06:54 AM, eviLudy wrote: Since there aren't any more questions,

Dude are you even reading my posts, I'm tired of asking the same questaion, so please just go bhack and read my other posts to find the question. I know star_cleaver suggested something, but I just can make the code, so I need one thats ready.

Response to Actionscript codes here! 2003-06-22 21:16:04


sorry, I meant "can't make the code" and please I'm begging I need it badly. HELP, need HELP, Ahhhhhhhh!

(I'm being a dumbass)

Response to Actionscript codes here! 2003-06-22 21:32:51


At 6/22/03 09:01 PM, Freek_Sk8er wrote: Well wtf do you think I've been trying, I can get it to work, it just doesnt look right, if you come close to him and he goes to the fight seen he just does one thing, but I need him to follow you around and attack you, thats just hard.

ummmm...try harder *shrug*

well, AS is not easy. What you're wanting to be handed to you on a silver platter is hard work. To make it look good and realisitic will take lots of work. I personally don't want to sit down and try to make some AI for a guy that i won't ever use. If you have specific questions i will answer them to the best of my ability but what you're asking is too much. I think most of the scripters in this forum probably feel the same way and that's why you're questions aren't being answered.

So go back and look at what you're doing and think of more specific questions to ask. Maybe one of the other scripters will be happy to take the time and help you but i personally just don't feel like doing that. So I wish you luck with your game.

-Star_Cleaver


I could surely die

If I only had some pie

Club-a-Club Club, son

BBS Signature

Response to Actionscript codes here! 2003-06-22 21:52:45


umm... how do you use actionscript for sound (attach sound and such)?

Response to Actionscript codes here! 2003-06-22 22:17:55


At 6/22/03 09:32 PM, Star_Cleaver wrote: A.

ummmm...try harder *shrug*

well, AS is not easy. What you're wanting to be handed to you on a silver platter is hard work. To make it look good and realisitic will take lots of work. I personally don't want to sit down and try to make s

Ok, I'll try harder, but I almost know all the scripts there is to know to make a good game, altho some dont work, no erors but it still dont work, humm, ok here is a question, I aint sure how to put this so sorry if it dont make sence, See I'm making this sk8ing game, and I got him to jump and do the trucks its just that when he lands, and?or if hes doing a trick when he lands, It doesnt go to the beef animation, this is the code I use

onClipEvent (enterFrame){
if (this.hitTest(_root.ground)
this.skater1.gotoAndPlay(15);}

It should work,

and there is this code I use for the jumping to stop And for the character to go to the frame with him standing still.

if (_root.ground.hitTest(this._x, this._y+20, true)) {
vel_y = 0;
jumping = false;
this.skater.gotoAndStop (1);
}

this one works for stopping the dude from falling (duh) and it works like its suppose to.
but when I modify the code so that when a trick is on it plays the beef animation, it fails to work.

this is the modified code,

if (_root.ground.hitTest(this._x+, this._y+, true)
Vel_y = 0;
jumping = false;
if (this.skater1.trick) {this.skater1.gotoAndPlay (15);}}

now the code failes on making him fall.or beef.
NOTE: when I say this.skater1.trick I know that the "trick" is suppose to equal "true" and I did put it to be "true"

So you got any ideas how I can make it work right.

Response to Actionscript codes here! 2003-06-22 22:25:34


sorry I messed up the modified code should be this.

if (_root.ground.hitTest(this._x, this._y+20, true)
vel_y = 0;
jumping = false;
if (this.skater1.trick)
this.skater1.gotoAndPlay (15);}}

oh, and I got a MC inside a MC thats Y its this.instancename.gotoandPlay (15);
and I'm using version 5, so Some of the MX codes might not work.

Response to Actionscript codes here! 2003-06-22 22:45:13


i have a question, im makin a shooting game, how do i get the shooting animation,bullet animation, and the enemy getting shot all when i click the mouse? i cant get it to work