00:00
00:00
Newgrounds Background Image Theme

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

426,601 Views | 7,948 Replies
New Topic

Response to Actionscript codes here! 2006-12-12 18:38:47


I wouldn't be posting here if I could find them in any of the tutorials. I've looked everywhere and asked everyone. Could someone PLEASE give me the scripts or tell me where I could get them or learn about them. I reallly can't figure this out. Some one help me please!

Response to Actionscript codes here! 2006-12-13 15:33:13


You know what I'm gonna resurrect this topic just to get an answer, read what I posted!

Response to Actionscript codes here! 2006-12-13 16:34:56


Hey EviLudy, can you get me that actionscript anytime soon?

Response to Actionscript codes here! 2006-12-13 16:58:00


RESSURECT!

Response to Actionscript codes here! 2006-12-13 17:06:46


Hawkfire you asking alot there. I surpose I could do the stuff for you. PM me

Response to Actionscript codes here! 2006-12-14 05:50:13


So, i used the actionscript code for the gun in the first page of this topic. But how to make the gun shooting, when you press the mouse and how to make enemys?

Response to Actionscript codes here! 2006-12-14 11:57:17


Good idea but personally i don't like the idea of people posting codes without explination as you get n00bs simply copying and paste without a clue whats going on then they will post saying "i wrote this code but it isnt working"

Response to Actionscript codes here! 2006-12-14 15:33:54


At 12/14/06 11:57 AM, UnknownFury wrote: Good idea but personally i don't like the idea of people posting codes without explination as you get n00bs simply copying and paste without a clue

I disagree. I still copy and paste.... but I exaimin the code to see how it works. Thats how I figured out hitTests, varible limits, and tons more. but If you copy and paste and dont even care about the inner workings of the script, you are a n00b.

Response to Actionscript codes here! 2006-12-14 15:42:33


that is so true

Response to Actionscript codes here! 2006-12-14 15:55:52


At 12/14/06 05:50 AM, PVblaa wrote: So, i used the actionscript code for the gun in the first page of this topic. But how to make the gun shooting, when you press the mouse and how to make enemys?

put this code in your gun MC:

onClipEvent (mouseDown) {
if (_root.currentammo>0) {
if (_root.ammoclips>0) {
gotoAndPlay("shot");
}
}
}
//lable shooting animation shot

make an enemy and put an invisible button over it on a higher level. then make the death animation after that. put this action on the clear button:

on (press) {
if (_root.currentammo>o) {
gotoAndPlay("death");
}
}
//label the the first frame of the death scene death

Response to Actionscript codes here! 2006-12-14 16:42:52


At 12/14/06 03:55 PM, Zeek664 wrote: if (_root.currentammo>o) {

correction, I put "o" instead of 0.
so make it: if (_root.currentammo>0) {

and a thx would be nice.....

Response to Actionscript codes here! 2006-12-14 19:46:56


Ok, now I need some help. I would like to know the script for random enemies like in, defend your castle. and how to make it gradualy increase in difficulty. and if posible, this is just another question, how to make it go on like that infinitly. can somebody help me?

Response to Actionscript codes here! 2006-12-14 21:07:13


At 5/4/03 05:01 AM, EviLudy wrote: Gun Tutorial
________________________________
First you make a movie clip, that shows the gun and put it on the bottom of the flash Document, then put this code in the actions of the gun:

onClipEvent (enterFrame) {
this._x = _root._xmouse += 20;
}

Then you make an laser dot, wich is the dot the gun aims to automaticly, and also make it a movieclip. Then put this code into the laserdot movieclip:

onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
onClipEvent (load) {
Mouse.hide();
}

How do you make it so when you click it shoots (I already have the movie clip of it shooting) and the thing you shoot like targets, fall down and go to the next one?

Response to Actionscript codes here! 2006-12-14 21:34:33


put this code on your gun movie clip! and lable the frame with the shooting "shot"

code:

onClipEvent (mouseDown) {
gotoAndPlay("shot");
}

Response to Actionscript codes here! 2006-12-14 21:43:08


At 12/14/06 09:34 PM, Zeek664 wrote: put this code on your gun movie clip! and lable the frame with the shooting "shot"

code:

onClipEvent (mouseDown) {
gotoAndPlay("shot");
}

It didn't work.

Response to Actionscript codes here! 2006-12-16 09:30:18


Hello. I am looking for a simple AS code for a jump script WITHOUT GRAVITY. Something very simple, that is activated with the SPACE button.

For example:

onClipEvent(enterFrame){
if (Key.isDown(Key.SPACE)){
something something

Response to Actionscript codes here! 2006-12-16 15:09:49


O.K now in shooter games, I have the scope for a sniper, but how do I make it where if you click on the enemy, he dies? Yes, I am an AS n00b. Thanks man, I've looked through some of this thread, nice job!

Ps- can you give me a link to a gunshot sound? Thanks!

Response to Actionscript codes here! 2006-12-16 15:30:19


At 12/16/06 03:09 PM, Programmer83 wrote: O.K now in shooter games, I have the scope for a sniper, but how do I make it where if you click on the enemy, he dies? Yes, I am an AS n00b. Thanks man, I've looked through some of this thread, nice job!

This should help you with your problems:
http://www.newgrounds.com/portal/view.php?id= 197445

thats where I started.

Response to Actionscript codes here! 2006-12-16 16:51:40


I need actionscript for a shooter where you control a jet fighter with arrowkeys and shoot with space and drop bombs with b. i also need to know how to do collision dectection with bombs/bullets.
please help me


BBS Signature

Response to Actionscript codes here! 2006-12-16 17:09:04


your asking alot there.... I could try to help you with the collistion detection and the movement.
I just need to know if its an over head game or an side scroller. which is it?

Response to Actionscript codes here! 2006-12-16 17:18:07


At 12/16/06 09:30 AM, UnknownFear wrote: Hello. I am looking for a simple AS code for a jump script WITHOUT GRAVITY. Something very simple, that is activated with the SPACE button.

I think this is what your looking for:

onClipEvent(enterFrame){
if (Key.isDown(Key.SPACE)){
this._y -= 10
}
}

this is really simple. has no gravity (kind of a weird concept if you ask me).

Response to Actionscript codes here! 2006-12-16 17:34:01


stop is
stop();

Response to Actionscript codes here! 2006-12-16 18:26:26


and to stop all the sounds is:
stopAllSounds();
//dur.....

Response to Actionscript codes here! 2006-12-16 19:25:33


What would be the actionscript for a button that just goes to the next frame?

Response to Actionscript codes here! 2006-12-16 19:27:58


At 12/16/06 05:18 PM, Zeek664 wrote: I think this is what your looking for:

onClipEvent(enterFrame){
if (Key.isDown(Key.SPACE)){
this._y -= 10
}
}

Well, it does go up, but, if I dont press the space key, it stops and it doesnt come down. Am I missing something?

Response to Actionscript codes here! 2006-12-16 19:37:26


Well this is weird. The ONLY ground the "player" can be on is the bottom one.

Weird?

--Controls--

Space to jump
Left and right to move

note: Hit Space to be able to go down.

Response to Actionscript codes here! 2006-12-16 19:46:15


At 12/16/06 07:25 PM, thequackattack wrote: What would be the actionscript for a button that just goes to the next frame?

on (release) {
nextFrame();
}

Response to Actionscript codes here! 2006-12-16 19:56:50


At 12/16/06 07:37 PM, UnknownFear wrote: Well this is weird. The ONLY ground the "player" can be on is the bottom one.

Lol, easily fixed. just put this code inplace of your hitTest part, and lable the grounds: ground1, ground2, ground3, ect.

code:

onClipEvent (enterFrame) {
if (this.hitTest(_root.ground#)) {
_y -= #;
//be sure to replace any # sign with the variable amount
}
}

so acording to how many grounds you have, copy and past that script to the amount of grounds you have (lets say 3). so if we have three ground movie clips you would put:

onClipEvent (enterFrame) {
if (this.hitTest(_root.ground1)) {
_y += #;
//replace # with your speed varible
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.ground2)) {
_y += #;
//replace # with your speed varible
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.ground2)) {
_y += #;
//replace # with your speed varible
}
}

and then rename the instances of your movie clips: ground1, ground2, ground3, ect.

:D fixed.

Response to Actionscript codes here! 2006-12-16 20:54:41


I need Rpg battle system game Action Scripts

Response to Actionscript codes here! 2006-12-16 23:40:01


At 12/16/06 08:54 PM, Ghettodawg4 wrote: I need Rpg battle system game Action Scripts

this might help for basics: Battle System Tutorial