00:00
00:00
Newgrounds Background Image Theme

OrangeWedge 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,552 Views | 7,948 Replies
New Topic

Response to Actionscript codes here! 2003-07-22 15:29:15


At 7/22/03 02:21 PM, Zips-McNish wrote: Question:

How do you do the scope action as in the following game.

Scope Assault

Good question, i dont know how to zoom... But if ur making A sniper game, i could explain how to make that u only see a part of the screen, like Snipe Justin Timberlake by TomFulp and Luis.


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-22 16:14:34


At 7/22/03 02:21 PM, Zips-McNish wrote: Question:

How do you do the scope action as in the following game.

Scope Assault

Probably with some serious masking...

Response to Actionscript codes here! 2003-07-22 16:23:51


At 7/22/03 03:23 PM, eviLudy wrote: There is another way then hitTest, but you have to write it like if this._x = that._x and that stuff, there is no other special funcion. HitTest is the easiest way.

But that way is too tedious. It also might not help alot with making complex shapes. Either way you'd still be defining points which is what you do with hitTest so its kind of pointless in my opinion.


(Yo star_cleaver, I added u 2 my buddy list if u don't mind. Ur a good actionscripter too, maybe we could make a game together some day)

What on aim? or msn? I'm guessing aim since that's what i have listed in my profile. And with the game idea, maybe, i'm first going to make a project with a friend of mine who is an artist then we'll see, i'm not going to make any promises yet=)


I could surely die

If I only had some pie

Club-a-Club Club, son

BBS Signature

Response to Actionscript codes here! 2003-07-22 16:32:07


At 7/22/03 04:23 PM, Star_Cleaver wrote: What on aim? or msn? I'm guessing aim since that's what i have listed in my profile. And with the game idea, maybe, i'm first going to make a project with a friend of mine who is an artist then we'll see, i'm not going to make any promises yet=)

I mean the newgrounds multi-author system buddy list =D


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-22 16:43:40


Hey does that book tell u the action scipts and explain them or tell u how to do soemthing (like make somehting random apear or soemthing) or do u have to make the codes urself.And i was wonder in is there anyaction scipt to load random scenes ... like the first scene starts off then theres a random load thing andn scene 2 , 3, or 4 is loaded (for a game) or set it so guys r put in random (but set spots).

Response to Actionscript codes here! 2003-07-22 19:50:15


Man I'm such a dumbass! Sorry. eviLudy already answered my question but I didnt see it. and Just in case I wanna know if by any chance the code will be effected if there is a scrolling background. Because my game is 2d platformer with scrolling background.
sorry again for being harsh.

Response to Actionscript codes here! 2003-07-22 20:18:33


Greetings All,

This may apply to this topic and it may not.

I am not trying to make a game :(. What I am trying to do is mimic tshirtsthatsuck.com top menu where the tshirt icon flows from menu item, to menu item.

I bought a couple of flash books, and left them at work and really dont want to wait until tomorrow to start on this.

In my mind... (meaning this is as I understand it)

I need roughly 5 different buttons, that when I put my mouse over them (see tshirtsthatsuck.com) an icon follows the mouse.

Is the way they did that all in actionscript? do i need to give up on the "button" functionality or do I incorporate both?

Any help would be appreciated, I really want to learn what the hell i'm doing.

Thanks!
GB

Response to Actionscript codes here! 2003-07-23 02:25:25


I hear there's a way to move objects using actionscript instead of tweened animation. What's the code for that?

Actionscript codes here!

Response to Actionscript codes here! 2003-07-23 02:58:58


At 7/23/03 02:25 AM, z7x_flag wrote: I hear there's a way to move objects using actionscript instead of tweened animation. What's the code for that?

yup there's a way of moving objects with Actionscript, convert the object to movieclip(duh) and then script!

But the script depends on what kind of movement you want, here is a little somthing:

keep moving to right:

onClipEvent (enterFrame) {
this._x += speed;
}
onClipEvent (load) {
speed=10;
}

Keep moving to left:
onClipEvent (enterFrame) {
this._x -= speed;
}
onClipEvent (load) {
speed=10;
}

Move right, and then left and again:

onClipEvent (load) {
speed=8;
xposi =0;
}
onClipEvent (enterFrame) {
if (_root.xpts < 20) {
this._x += speed;
_root.xpts += 1;
}
}
onClipEvent (enterFrame) {
if (_root.xpts >= 20) {
this._x -= speed;
this._x -= speed;
_root.xposi -= 1;
}
if (_root.xposi <= -20) {
_root.xpts=0;
_root.xposi =0;
}
}

In all three scripts you can change the moving speed by changing the number in
speed=8;

Keep posting

~EviLudy


Swing a Little more!

.. ROCK OUT!

BBS Signature

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


At 7/22/03 04:43 PM, Fire-Blaze wrote: Hey does that book tell u the action scipts and explain them or tell u how to do soemthing

My book mostly explains all the acions (it explains like this:
_visible
this true or false value(boolean) tells if a object is visible or not.

But there are about 3 tutorials in my book (1. How to use compoments, 2. How to use Math.Random, 3. How to use actionscript to rotate a object)

The rest of The scripts I must script myself


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-23 09:57:46


Okay people, this message is for the ones that have played my criminality version 2.

Version 3 is almost done now, and im searching for testers. I seek about 15 testers for my game, and 3 have already been found.

If any of you guys want to be a tester for criminality V.3 then act quick and post here or email me.

Off course the testers will be in the credits.
List of found testers:
1. ZipCase
2. Stillo3
3. Zip-McNish

Remember, act fast, if I've found 15 there are no places anymore.


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-23 10:13:45


At 7/23/03 05:57 AM, eviLudy wrote: Okay people, this message is for the ones that have played my criminality version 2.

Version 3 is almost done now, and im searching for testers. I seek about 15 testers for my game, and 3 have already been found.

If any of you guys want to be a tester for criminality V.3 then act quick and post here or email me.

Yeah, sure, I'd love to be a tester, I liked the previous games, all I have to do is test the game, look for bugs and then report to you, right?

Response to Actionscript codes here! 2003-07-23 10:43:10


Am I one of the three?

Response to Actionscript codes here! 2003-07-23 12:43:29


At 7/23/03 06:13 AM, axeltheman wrote: Yeah, sure, I'd love to be a tester, I liked the previous games, all I have to do is test the game, look for bugs and then report to you, right?

Right.

List of testers:
Zips McNish
Stillo3
Axeltheman
Zipcase


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-23 18:19:06


Ok kewl, do you have msn so i can add you or something?

Response to Actionscript codes here! 2003-07-23 19:11:25


At 7/23/03 12:43 PM, eviLudy wrote:
At 7/23/03 06:13 AM, axeltheman wrote: Yeah, sure, I'd love to be a tester, I liked the previous games, all I have to do is test the game, look for bugs and then report to you, right?
Right.

List of testers:
Zips McNish
Stillo3
Axeltheman
Zipcase

What the heck. I'll do it, if you have room left. AIM: Lord Aba69


What may man within him hide, though angel on the outward side.

BBS Signature

Response to Actionscript codes here! 2003-07-24 01:54:04


Alright. Earlier you explained how you make a game where you can pick up an item, and it goes into an item slot. I'm going to make a game, and after you find like 4 items, (and they goto a slot) the game goes to, say, scene 2. Is there a script to do that? just a simple onclipevent or something. Someone please help? thanks.

Response to Actionscript codes here! 2003-07-24 03:58:44


At 7/23/03 07:26 PM, SKS wrote:

updated list of testers:
Stillo3
Zipcase
Axeltheman
Lord_Aba
SKS
Zips-Mcnish

Thats 6 already, Ill be finishing it today or tomorrow.


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-24 05:40:43


OK criminality 3 is finished, but there's probably a load of bugs in it so it isnt going to be submitted yet, ill mail the testers a file to play it and instructions of wat to do.

6 testers is enough.


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-24 05:43:29


At 7/23/03 06:19 PM, axeltheman wrote: Ok kewl, do you have msn so i can add you or something?

gimme ur email


Swing a Little more!

.. ROCK OUT!

BBS Signature

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


i made this when helping the person who made the thread "randomability" or somethin like that. thought it may be a bit useful here... maybe.

why couldnt you just ask for one, it all gets really confusing. but i'll give you some answers...

okay, make a movieclip with 5 frames, each frame different. make another layer in the frame, and put the action stop(); in the layer going throughout all the frames.

onClipEvent (load) {
this.gotoAndStop(random(5));
_x = random(525);
_y = random(375);
xmov = random(20);
ymov = random(20);
}
onClipEvent (enterFrame) {
_x += xmov;
_y += ymov;
if (_x>525) {
xmov = random(20)*-1;
} else if (_x<25) {
xmov = random(20);
} else if (_y<25) {
ymov = random(20);
} else if (_y>375) {
ymov = random(20)*-1;
}
}

Response to Actionscript codes here! 2003-07-24 08:24:40


At 7/24/03 06:19 AM, ChocolateChipClock wrote: i made this when helping the person who made the thread "randomability" or somethin like that. thought it may be a bit useful here... maybe.

Hey! thats a pretty cool script, since in the "TOP SECRET PROJECT" of mine wich im working on now a lot of randomizing is needed.

(Its not another criminality)


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-24 11:04:29


Hey eviLudy you know the code you gave me for the movement thing on the enemies. well I have a scrolling bacgroung and the enemy has to scroll to so the code gets messed up when it scrolls, can you help.

Response to Actionscript codes here! 2003-07-24 11:12:22


Damn it I'm getting tired of this, I posted with inforcer's account again, why doesnt that bitch just log out when he's done! So what inforcer said is what I was suppose to say, K.

Response to Actionscript codes here! 2003-07-24 18:51:36


onClipEvent (enterFrame) {
// right
if (Key.isDown(Key.RIGHT)) {
_rotation = _rotation+move;
}
// left
if (Key.isDown(Key.LEFT)) {
_rotation = _rotation-move;
}
// up
if (Key.isDown(Key.UP)) {
if (move<8) {
move++;
}
} else if (move>0) {
move--;
}
// down
if (Key.isDown(Key.DOWN)) {
if (move>-10) {
move--;
}
} else if (move<0) {
move++;
}
// enter
if (Key.isDown(Key.ENTER)) {
_x = 200;
_y = 200;
_rotation = 0;
move = 0;
}
// _x & _y position
if (_rotation>180) {
_y = _y+(move*Math.cos(Math.PI/180*_rotation));
_x = _x-(move*Math.sin(Math.PI/180*_rotation));
}
if (_rotation<180) {
_y = _y-(move*Math.cos(Math.PI/180*_rotation));
_x = _x+(move*Math.sin(Math.PI/180*_rotation));
}make an exellnt car game with it.

Response to Actionscript codes here! 2003-07-24 19:53:46


Sorry for posting again, but Can someone tell me how to do this?

Earlier you explained how you make a game where you can pick up an item, and it goes into an item slot. I'm going to make a game, and after you find like 4 items, (and they goto a slot) the game goes to, say, scene 2. Is there a script to do that? just a simple onclipevent or something. Someone please help? thanks.

Response to Actionscript codes here! 2003-07-24 21:09:11


Aww cmon someone respond!!

Response to Actionscript codes here! 2003-07-25 04:15:13


At 7/24/03 07:53 PM, MarkOfTheBeast wrote:

the game goes to, say, scene 2. Is there a script to do that? just a simple onclipevent or something. Someone please help? thanks.

Easy, just add this very small piece of script to the script where the item is picked up:

gotoAndStop("scene2", 1);

keep posting


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-25 04:16:49


Changing the appearance of a movieclip in actionscript:

Changing alpha (trancpencety)with actionscript:

onClipEvent (load) {
value=50;
this._alpha=value;
}
(you can change the variable value into somthing else for more or less alpha)
_______________________________________

Rotating an object in actionscript.

onClipEvent (load) {
value=90;
this._rotation=value;
}
(you can change the variable value into somthing else for more or less degrees of rotation)
_______________________________________

Making an object bigger with actionscript.

onClipEvent (enterFrame) {
value=1;
this._height += value;
this._width += value;
}

(you can change the variable value into somthing else for sizing faster or slower)
_______________________________________

Making an object smaller with actionscript.

onClipEvent (enterFrame) {
value=1;
this._height -= value;
this._width -= value;
}

(you can change the variable value into somthing else for sizing faster or slower)
_______________________________________

Keep posting

~EviLUdy


Swing a Little more!

.. ROCK OUT!

BBS Signature

Response to Actionscript codes here! 2003-07-25 13:03:43


keep posting plz


Swing a Little more!

.. ROCK OUT!

BBS Signature