00:00
00:00
Newgrounds Background Image Theme

rafaelnithamix 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,510 Views | 7,948 Replies
New Topic

Response to Actionscript codes here! 2007-01-11 08:42:17


At 1/11/07 08:26 AM, West-End-Pro wrote: Why does that thing not work then when its is "Math.PI-90". Explain smartass.

Incase you didn't notice, it was moving perpendicular to the rotation, which means that it either needs to not have a -90. I thought that was kinda logical...

And trig is more than just SOHCAHTOA. A lot more than that...

Response to Actionscript codes here! 2007-01-11 13:42:12


oh come on, stop the argument already. Actionscript does not have to work exactly according to mathematics. In this case, the -90 will screw up the control, even if it applies to the rules of trigonometery.
Thanks for the code btw, I'll credit you when I finish my game =)
So West-End-Pro's codes works perfectly to me, problem solved.

Response to Actionscript codes here! 2007-01-16 14:56:52


Does anyone here know any actionscript for a game similar to final fantasy, and when you approach an enemy, you go into a battle scene, and you can move around a landscape with arrow keys. i have done the artk, and if anyone can give me proper actionscript, they will see their names in the credits.


BBS Signature

Response to Actionscript codes here! 2007-01-23 23:08:40


At who gives a shit, that west-end-fag wrote:

stuff bout AS

now can you tell me a script to make the crosshair follow teh cursor?


BBS Signature

Response to Actionscript codes here! 2007-01-24 00:23:55


How do you get it so that if you walk off screen you go to the next area, and if you don't have a certen item you can go on?


"WE HATE LOVE, WE HATE JOY, WE LOVE MONEY" - Sargent Pepper's Lonely Hearts Club Band

BBS Signature

Response to Actionscript codes here! 2007-01-24 03:23:40


"WEST END PRO, WEST END PRO, WEST END PRO"

Response to Actionscript codes here! 2007-01-26 10:52:08


//the 1337 swear function:

swear = function (t) {
var a:Array = new Array("fuck", "hell", "shit", "damn");
for (b = 0; b < a.length; b++) {
if (t.indexOf(a[b]) == -1) {
if (b == a.length - 1) {
return false;
}
} else {
return true;
break;
}
}
};
trace(swear("I like flowers....."));
// returns false
trace(swear("I fucking hate Luis"));
// returns true

Response to Actionscript codes here! 2007-01-26 17:11:05


I'm making a platformer for my brother, where he walks around in a maze lit up only where he is, where you collect jewls and etc. and they add to his money. Where monsters come randomly and attack him, and that he can use his money to buy items that raise the amount of light around him, help him kill enemies, etc.

I need Actionscript for pretty much everything. It is only my second project, and I'm ordering that book as fast as possible, but in the meantime, can I have help?

Response to Actionscript codes here! 2007-02-09 16:58:39


This might sound a bit odd, because I'm not sire how to word this. Does somebody know how I can make a screen, where if you send the object off one end, it will come on the screen on the opposite side? It's kind of like when you play pac-man and you send him to one side and he pops up on the other side when he goes off screen.

Response to Actionscript codes here! 2007-02-27 19:38:53


At 2/9/07 04:58 PM, Fantum wrote: This might sound a bit odd, because I'm not sire how to word this. Does somebody know how I can make a screen, where if you send the object off one end, it will come on the screen on the opposite side?

Sure...

if (_root.pacman._x > _root._width){
_root.pacman._x = 0;
}

Stuff like that.


Come join music competitions on Chips Compo and hang on our Discord!

Good artists copy. Great artists get banned from the Audio Portal.

BBS Signature

Response to Actionscript codes here! 2007-02-27 20:01:07


I want to make a highscore table, but not on a website inside flash is it possible cause I dont have a webstie?


BBS Signature

Response to Actionscript codes here! 2007-03-24 18:11:42


At 2/27/07 08:01 PM, KHA0S wrote: I want to make a highscore table, but not on a website inside flash is it possible cause I dont have a webstie?

LINK

Happy now?


BBS Signature

Response to Actionscript codes here! 2007-03-25 04:03:03


I need help with gun aiming. I mean, I know how to have a gun aim, pivot, and rotate in the direction that the mouse is, but I wold like to make it that the bullet will end ath the pint that I aimed the mouse

Response to Actionscript codes here! 2007-05-06 15:50:40


Hey, can someone tell me how to make a double button combinations?

Like I'm making a Kickflip. To do a kickflip you press A. A+A will be a double kickflip. How do I assign multiple buttons to activate the animation the MC?

Response to Actionscript codes here! 2007-05-09 16:28:49


*whistling*

Response to Actionscript codes here! 2007-05-12 09:08:58


This tread rocks, thanks a lot EvilLudy!!

Response to Actionscript codes here! 2007-05-12 10:09:39


At 4/6/07 10:11 AM, madcat1 wrote: how do we make the music in a musicvideo, fallow the stuff in it, like make it rythmen and stuff, do we need a programe for that? cause doing it manualy is NOT easy at all. i think theres a btter way then that. =3

No their isn't. There is no easy way around everything people don't feel like doing by hand.

Response to Actionscript codes here! 2007-05-13 18:35:01


Hello, I need help in a top-down shooter ,, I need the console; something like Reverb. PLZ help!!!


What should i put in here?

Response to Actionscript codes here! 2007-05-24 04:58:30


Yeah this thread is awesome and full of vital info, But Don't you think we should make sub-folders, For example... One for sounds, one for shooting objects (Guns etc..) one for RPG, one for each of the 'begins',' Ints' and 'pros'. Thats what I would like to see.

stopAllSounds();


There is a fine line between hobby and obsession.

BBS Signature

Response to Actionscript codes here! 2007-07-12 21:32:42


Ok, I know how to make a mc follow the mouse, but is there a way to if you make the mouse move to the left a bit the mc turns a bit?
thanks,
-Jonimaster

Response to Actionscript codes here! 2007-07-12 21:52:06


I need help with 2 things that I think are actionscripted. First, can you hit like a ball and make it go flying? (whats the code.) Is there any way when something goes off screen it follows the ball (in a game) (what is the code for that)

Response to Actionscript codes here! 2007-07-20 02:00:37


When the user presses "space" i want a bullet to spawn from my players gun and if it's touches an enemy for the enemy to die.


BBS Signature

Response to Actionscript codes here! 2007-07-20 03:10:55


Stops the movie from playing.

stop();


I like pie

Response to Actionscript codes here! 2007-08-18 22:01:55


Hey Dudes!

I was wondering if anybody could give me a hand with a little game I'm making...I've done several movies before using Flash, but I've never tried to make a GAME. That's why I'm not that good on ActionScripting....Well, anyway, I'm making a point-and-click game, and I've got all the Actions Scripting I could need....except for one little code...I'll explain the problem now:

I've got this door (which is an MC) that sould open if I click on it ONLY if another MC (called "circle") has a certain value for the x axis (350). When I say "open" I mean that it plays starting from the second frame, which is an animation of the door opening. Well, I have this other button that makes the circle get those coordinates, so when I click on that button, well..you guessed, "circle" gets 350 as a value for the x axis. then, when I click on the door, it opens (as it should do). However, if I click on the door before clicking on the other button, "circle" gets 350 as it's value for x and then the door opens.... I can't understand what's going wrong with the code... well, here it is in case any of you can help me with this:

This is on the door:

onClipEvent(mouseUp){
if(_root.circle._x=350.0) {
if(this.hitTest(_root.cursor)){
gotoAndPlay("circleMC",2)
}
}
}

This is on the burron that moves the circle:

on (release) {
_root.circle._x=350.0
_root.circle._y=183.0;
}

Thanks anyway :)


.:Degradé:.

BBS Signature

Response to Actionscript codes here! 2007-08-18 22:32:33


heyy there guys
i was wondering if you actionscript genuses could give me a hand in a simpe stickman game that im making!

the game includes:
walking
jumping (not using gravity but instead a movieclip!)

i have an .FLA here of what if done

what im trying to do here is to have it so the stickman walks left and right and jumps using a fordflip movieclip!
i cant get the fordflip/jump right as you have to HOLD down the space key

can any1 help??
thanks guys


account moved, delete this account tom...please lol

Response to Actionscript codes here! 2007-08-19 22:43:15


At 8/18/07 10:01 PM, Degrade wrote: Hey Dudes!

I was wondering if anybody could give me a hand with a little game I'm making...

Hey Guys, already sorted it out. Thanks anyway ;)

D%u02DC


.:Degradé:.

BBS Signature

Response to Actionscript codes here! 2007-08-19 23:13:38


Wow, I saw this thread 18 hours ago, and it had like 3 pages XD


| Email | PM | Underground Flash :D | Whoah, I'm not touching that with my 3 foot penis. ;D

BBS Signature

Response to Actionscript codes here! 2007-08-19 23:40:53


At 8/19/07 11:13 PM, MixedDrink wrote: Wow, I saw this thread 18 hours ago, and it had like 3 pages XD

Seems like a lot of people don't know Actionscript..

Including me. :S


BBS Signature

Response to Actionscript codes here! 2007-08-20 00:49:40


done millions of times but....heres my snow/rain script
also duplicate script

onClipEvent (load) {
//when the clip is first loaded up
movieY = 400;
movieX = 550;
//MOVIECLIP INFO EDN HERE
//RANDOM SCRIPT START HERE
_alpha = 50+Math.random()*100;
_xscale = ["smallest X"]+Math.random()*["largest X"];
_yscale = ["smallest Y"]+Math.random()*["largest Y"];
this._x = 0+Math.random()*movieX;
this._y = 0+Math.random()*movieY
//EDN OF RANDOMIZE SCRIPT
//info scripts NOW
data1 = .5+Math.random()*1.5;
data2 = movieX-movieX-15
data3 = .1+Math.random()*5;
}
onClipEvent (enterFrame) {
this._y += data1;
//....Y is added Data1
this._x += data3;
//....X is added Data3
//loop script
if (this._y>=movieY) {
//if our snowflake hits the edge of our screen
this._y = -15;
//its sent to neg. 15
}
//loop script2
if (this._x>=movieX) {
this._x = data2;
//Its sent to a neg. area
}
}
//I'm going to try an anti-laq version soon

duplicate script...

for (k=0; k<100; k++) {
duplicateMovieClip(this.flake, "snow"+k, k);
}


when in doubt.... punch HAMZ10 IN THE FUCKING FANNY!

BBS Signature

Response to Actionscript codes here! 2007-08-20 01:04:19


what code do i use to display the current frame number in dynamic text box with var power1 and the movieclip to get the frame number from is instance powerbar