00:00
00:00
Newgrounds Background Image Theme

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

393,065 Views | 7,981 Replies
New Topic

Response to Actionscript codes here! 2003-12-22 21:54:09


hey, wich behaviour do u have to put ur symbols
in to make the crosshair move with the mouse
graphic, movie ,or button...im making a shooter you
see!

Response to Actionscript codes here! 2003-12-22 21:59:18


Try movie. Graphics can't have actions in and a button is well a button and thats not what a crosshair is.

Response to Actionscript codes here! 2003-12-22 22:10:29


hey when you enter that actionscript do you enter it in fs command or do u just press the action button that make up that actionscript

Response to Actionscript codes here! 2003-12-22 22:15:04


At 12/22/03 09:13 PM, Sulphent wrote:
At 12/22/03 09:07 PM, ryanryan wrote: Hey, i need to know how to make a actionscript where
when you move the mouse the crosshair goes with it like
in a shooter
For the smoothest action add this to the crosshair:

onClipEvent (mouseMove) {
this._x=_root._xmouse;
this._y=_root._ymouse;
updateAfterEvent();
}

ok..but when you enter that do you enter it in fs command or do u just press the actionbuttons that make up that actionscript

Response to Actionscript codes here! 2003-12-22 23:33:23


You don't need fscommand at all, and i don't know what you mean by "actionbuttons that make up that actionscript" just copy and paste it in to the movie clip.

Response to Actionscript codes here! 2003-12-23 00:53:43


I'm bored.. and I don't want to dig in my old files to search the action scripts.. guys, help me

* p * l * e * a * s * e * <-------- Nice stars here

I need this things:

1.- The action script for "No second button of the mouse" I mean, that I'm doing a game and I hate to make traps to the cheaters that always try to make click and use the "play" functio... so I always make a frame with "gotoAndPlay" as a trap... so now I want that script... I remember that is something with the FSCOMMAND, but as I said: I'm working in the movie and I'll take almost a week to dig in all my files....

2.- The action script for the preloader... Yes, I know the action, but I need all the action script: I'll put a MC with some animation, and the animation will change until is loaded (Example: when is at 10% the girl will do something, when is at 20% she'll do something different, at 30% other thing, etc...)

3.- A hug :)

Now, I'll realy apreciate your help guys :)

<3

Response to Actionscript codes here! 2003-12-23 01:14:28


At 12/23/03 12:53 AM, Ozcar_Needs_Prozac wrote:
1.- The action script for "No second button of the mouse" I mean, that I'm doing a game and I hate to make traps to the cheaters that always try to make click and use the "play" functio... so I always make a frame with "gotoAndPlay" as a trap... so now I want that script... I remember that is something with the FSCOMMAND, but as I said: I'm working in the movie and I'll take almost a week to dig in all my files....

I think you mean this: add this to your first frame on the main timeline:
fscommand("showmenu", "false");

Response to Actionscript codes here! 2003-12-23 01:40:56


At 12/23/03 01:14 AM, Sulphent wrote:
I think you mean this: add this to your first frame on the main timeline:
fscommand("showmenu", "false");

lol

Yeah... is that one :) Thank you sulphent... *Remember to add sulphent to the Xmas list*

And what about the second one?

Response to Actionscript codes here! 2003-12-23 02:13:09


here's a little code i made that you can use to make words form letter by letter, or sentences formed word by word. make a dynamic or input text box with the var name "textbox". then put this code in a movieclip. change the variable "delay" to however long you want the delay between the letters or words to come up.

onClipEvent (load) {
i = -1;
delay = 2;
}
onClipEvent (enterFrame) {
letters = ["t", "h", "i", "s", " ", "i", "s", " ", "a", " ", "t", "e", "s", "t"];
time += 1;
if (time>delay) {
time = 0;
i++;
_root.textbox += letters[i];
}
}

Response to Actionscript codes here! 2003-12-23 02:16:20


here's a script i made to run your movie backwards... put this script into a movieclip.
change the variable "lastFrame" to the last frame of the animation you want to play backwards.

onClipEvent (load) {
lastFrame = 35;
}
onClipEvent (enterFrame) {
i++;
_root.gotoAndStop(lastFrame-i);
if (i>=lastFrame) {
i = 0;
i++;
}
}

Response to Actionscript codes here! 2003-12-23 02:29:49


Ozcar - Not sure about the second one at the moment, i havn't read lots up on preloaders as i havn't really made a full blown program for the internet, i just use it for my own use so there is no need for one.

Oh and where are you getting a Sulphent from for x-mas? :P

Nice codes chocolate they work good.

Response to Actionscript codes here! 2003-12-23 02:47:35


At 12/23/03 02:29 AM, Sulphent wrote: Ozcar - Not sure about the second one at the moment, i havn't read lots up on preloaders as i havn't really made a full blown program for the internet, i just use it for my own use so there is no need for one.

OK... I'll wait for an answer :)

Oh and where are you getting a Sulphent from for x-mas? :P

lol... that's my secret :P

Nice codes chocolate they work good.

Hey! CCC! Can you help me please :)

Response to Actionscript codes here! 2003-12-23 03:00:07


At 12/23/03 01:14 AM, Sulphent wrote: I think you mean this: add this to your first frame on the main timeline:
fscommand("showmenu", "false");

That one only works for the stand-alone player.
Use this:

Stage.showMenu = false;

Response to Actionscript codes here! 2003-12-23 03:19:26


At 12/23/03 02:13 AM, ChocolateChipClock wrote: here's a little code i made that you can use to make words form letter by letter, or sentences formed word by word. make a dynamic or input text box with the var name "textbox". then put this code in a movieclip. change the variable "delay" to however long you want the delay between the letters or words to come up.

onClipEvent (load) {
i = -1;
delay = 2;
}
onClipEvent (enterFrame) {
letters = ["t", "h", "i", "s", " ", "i", "s", " ", "a", " ", "t", "e", "s", "t"];
time += 1;
if (time>delay) {
time = 0;
i++;
_root.textbox += letters[i];
}
}

Nice code. But, if everything's going to be a single letter, don't you think it would be easier to do it this way?:

onClipEvent (load) {
i = -1;
delay = 2;
//
sentence = "This is a test.";
letters = sentence.split("");
}
onClipEvent (enterFrame) {
if (time++ > delay && i++ < letters.length) {
time = 0;
_root.textbox += letters[i];
}
}

That way, you wouldn't have to have every single letter as a different element. :)

Response to Actionscript codes here! 2003-12-23 03:21:46


Ah yeah i forgot about that.

Response to Actionscript codes here! 2003-12-23 03:37:03


At 12/23/03 12:53 AM, Ozcar_Needs_Prozac wrote: 2.- The action script for the preloader... Yes, I know the action, but I need all the action script: I'll put a MC with some animation, and the animation will change until is loaded (Example: when is at 10% the girl will do something, when is at 20% she'll do something different, at 30% other thing, etc...)

Well... since you used the perrrty stars and the lovely love-heart... I'm forced to help you.

For the the preloader:

onClipEvent (load) {this.stop();}
onClipEvent (enterFrame) {
this.gotoAndStop(Math.floor(_root.getBytesLoaded() / _root.getBytesTotal() * this._totalframes));
if (_root.getBytesLoaded() == _root.getBytesTotal()) play();
}

3.- A hug :)

{{{{{{Ozcar}}}}}}

Response to Actionscript codes here! 2003-12-23 03:55:43


At 12/23/03 03:37 AM, CrookedAsterisk wrote:
{{{{{{Ozcar}}}}}}

Thank you ! :D

I'll test it tomorrow morning (Here's 2:57 am and I'm tired of draw naked girls)

{{{crookedasterisk}}}

Response to Actionscript codes here! 2003-12-23 07:32:55


m working on a skteboard game and i'm kind of stuke in teh actionscripting i need to know tow things.

one.

i'm tying to explane it as good as possible!!!
when the skateboarder ride's he is ride on the ground but when i want him to ollie of something he lands at the same height he ollie's of and not lower how can make somthing he rides on that it will follow the line he is riding on sow when the ground is going lower the the skateboarder is going lower whith the ground.

two.

i'm working on a bench and whant it that on keypress G he will grind on the bench

the skateborders instant name is "boy" the boy is an MC
and the bench name is "bench" whitch he must grind on
on frame 77 the boy is in the grind position

this is my action script but it dusn't work when i press G

onClipEvent (enterFrame) {
if (Key.isDown(Key.DOWN)) {
gotoAndPlay(13);
}
if (Key.isDown(Key.RIGHT)) {
this._x = this._x+6;
}
if (Key.isDown(Key.LEFT)) {
this._x = this._x-6;
}
if (Key.isDown(Key.UP)) {
gotoAndPlay(45);
}
if (Key.isDown(Key.G)) {
if (boy.hitTest(bench))
tellTarget (boy)
gotoAndPlay(77);
}
}

oke back to the first thing a needed to know

this is a picture to show a bit what i ment

the red line is it that a want when the boarder jumps he whill not land on the same height as the firts red line and whill stay on the height of the second line i hope you get it what i mean.
the lines are just to indicate what i mean this will not come in the game
also the whole level design will be differnt it was just to let you know what i mean

Actionscript codes here!

Response to Actionscript codes here! 2003-12-23 07:32:56


whoa!! way to meny messages to wander thorugh... can sum1 just tell me the code to make something move and swap symbols while moving by using the arrow keys... i am trying to make a 2d fighter game

Response to Actionscript codes here! 2003-12-23 11:28:34


heres a problem. i want this script at the bottom to go to the scene LEVEL 1 (the second scene) but instead it goes to the first scene. the action is in the second scene, and it confusing! can anyone help?

tellTarget ("_parent") {
gotoAndPlay("LEVEL 1", 2);
}

Response to Actionscript codes here! 2003-12-23 11:39:13


At 12/22/03 11:33 PM, Sulphent wrote: You don't need fscommand at all, and i don't know what you mean by "actionbuttons that make up that actionscript" just copy and paste it in to the movie clip

How do u copy and paste it into the movie clip

Response to Actionscript codes here! 2003-12-23 12:02:53


can anyone tell me an actionscript where when you click on a guy wiuth your crosshair he gets damage and goes down off screen..

Response to Actionscript codes here! 2003-12-23 12:30:19


hey, i'm making a new flash MMORPG, and i wanna know how to make a login screen, with password and username. can anyone help me?

Response to Actionscript codes here! 2003-12-23 12:53:04


hey, is there a code so that where ever you click in my game after 3 clicks it takes you to another scene.

Response to Actionscript codes here! 2003-12-23 12:55:57


for that you have to get it work with sql databases and stuff i think, i dont how to do it mind you

Response to Actionscript codes here! 2003-12-23 13:13:00


At 12/23/03 07:32 AM, pilomaker wrote: m working on a skteboard game and i'm kind of stuke in teh actionscripting i need to know tow things.

Why dont you just use a jumping script, there is one on the first page of this thread?


- Sig provided by ME of the NGSM

- If you try to stay high, your bound to stay low. -

- If I make you a sig, please credit me here -

BBS Signature

Response to Actionscript codes here! 2003-12-23 13:25:12


At 12/23/03 12:53 PM, LiL_Filmore wrote: hey, is there a code so that where ever you click in my game after 3 clicks it takes you to another scene.

Here is what I did, I made a Movie clip, And Set its alpha to 0%, Then I modified the score script for mousedown, paste this into the MC's Actions:

onClipEvent (mouseDown) {
_root.score += 1;
if (_root.score == 3) {
_root.gotoAndPlay("Scenename",Frame);
}
}


- Sig provided by ME of the NGSM

- If you try to stay high, your bound to stay low. -

- If I make you a sig, please credit me here -

BBS Signature

Response to Actionscript codes here! 2003-12-23 13:47:40


OmFg AnSwEr mY QuEsTiOn!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~!!!!!!!!!!!
!!!!!!!!!!!!~!!!!!!!!!!!!!!!!!!!~!!!!!!!!!!!!!!!!!!

Response to Actionscript codes here! 2003-12-23 15:46:35


At 12/23/03 03:19 AM, CrookedAsterisk wrote:
At 12/23/03 02:13 AM, ChocolateChipClock wrote:
onClipEvent (load) {
i = -1;
delay = 2;
//
sentence = "This is a test.";
letters = sentence.split("");
}
onClipEvent (enterFrame) {
if (time++ > delay && i++ < letters.length) {
time = 0;
_root.textbox += letters[i];
}
}

haha, nice code. i never knew about the split function. i'll make sure to remember that.

Response to Actionscript codes here! 2003-12-23 15:49:56


CAn you guys answer me--->!#$@!##@!$!<-----SWearing!