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,053 Views | 7,981 Replies
New Topic

Response to Actionscript codes here! 2004-10-07 18:28:40


At 10/7/04 06:24 PM, dlethal wrote: I want to make a trivia game with rank results at the end based on the answers. I have no experience with action script. Any help on that one?

you also need none! flash mx and mx 2004 have templates for quizes

flash mx:
file->new from template->quiz

flash mx 2004:
file->new->templates->quiz

hope it helps

Response to Actionscript codes here! 2004-10-07 18:31:43


At 10/7/04 05:39 PM, MaxWasHere wrote: so I know i should do it differently, but I'm just wondering if it goes through the loop every time it enters frame,

yes it does
:does that make it run any slower? particularly with a high-ish framerate like 36 fps, if it has to do that loop 36 times a second, would it go slowly?

of course it runs slower, major loops make your program run much slower,
if you cann the running speed of the script on the page S
and the times the loop runs I
the runtime would be S*I instead of S

Response to Actionscript codes here! 2004-10-07 18:33:59


WHY??

is it possible you only have 1 frame in that particular scene?

Response to Actionscript codes here! 2004-10-07 18:50:34


nice mixture of AS help guys, keep it up!

Response to Actionscript codes here! 2004-10-07 18:51:20


At 10/7/04 06:31 PM, Inglor wrote: if you cann the running speed of the script on the page S
and the times the loop runs I
the runtime would be S*I instead of S

I'm not sure what you mean by that... If there are 10 platforms, it would run 10 times slower?

Response to Actionscript codes here! 2004-10-07 18:57:03


well, if you check all the platforms at each loop, since hitTest is a "heavy and resource consuming" function it would run pretty slower... but on my platformer i only check the next 3 platforms each time,

Response to Actionscript codes here! 2004-10-07 20:18:30


Yes that does help, thanks.

Response to Actionscript codes here! 2004-10-08 12:38:39


Hey all, quite a while ago, someone posted a script in this topic for the Grand Theft Auto basic engine, anyone know where it is? I looked but can't find it.
Help would be much appreciated.
Cheers.

Response to Actionscript codes here! 2004-10-08 21:01:38


Does anyone know how to make it were there is a circle and on the circle is a pointer that slides around only the circle, and points to the mouse?

Response to Actionscript codes here! 2004-10-09 02:59:48


THE WALLS DONT WORK

Response to Actionscript codes here! 2004-10-09 03:07:21


I need all the maze stuff+walls+if jou walk somwhere that he comes at another frame

say it easely i am just 10 jears

Response to Actionscript codes here! 2004-10-09 03:13:12


At 10/9/04 03:07 AM, astu1 wrote: I need all the maze stuff+walls+if jou walk somwhere that he comes at another frame

say it easely i am just 10 jears

if you just said ten YEARS, then you have to leave. you have to be 13 to be on this website.

Response to Actionscript codes here! 2004-10-09 08:58:06


At 10/9/04 03:07 AM, astu1 wrote: say it easely i am just 10 jears

Alias: astu1
Web: none
AIM: none

Age: 16
Gender: Male
Habitat: seattle
Job: student

What's that now? Are you lieing to everyone?

Anyways, go to Flashkit or Actionscript.org to find some info on hitTests and the gotoAndPlay function.

Response to Actionscript codes here! 2004-10-09 16:31:54


Ive got a movie clip of an enemy named "FootSolder" which I've coded to duplicate on a random 1-3 second timer and then walk towards the screen. I also have a targeting rectical attatched to the mouse that, when hitTest'ed with the enemy while the space (Fire) key is down, will perform an action.

My question is, I need to dynamically name a variable for each duplicated FootSoldier for the soldiers health value. The soldiers are on a soldiernumber varience (That is, each new duplicates name is "soldier"+soldiernumber , so the first duplicate would be soldier1, the next would be soldier2, etc.). How can I set up a unique variable for each of their health based on the soldiernumber?

-Frenchi

Response to Actionscript codes here! 2004-10-10 07:15:39


At 10/8/04 01:03 PM, PillowBiter wrote:
At 10/8/04 12:38 PM, Zonox wrote: Hey all, quite a while ago, someone posted a script in this topic for the Grand Theft Auto basic engine, anyone know where it is? I looked but can't find it.
Help would be much appreciated.
Cheers.
its on the first friggin page... >:(
look around a bit

Sorry dude, I looked from page 2, because I tried to remember, geez, people make mistakes.

Response to Actionscript codes here! 2004-10-10 07:36:55


Umm the Grand Theft Auto script isn't on the first page, well I can't see it at least!
Help.

Response to Actionscript codes here! 2004-10-11 10:29:07


Hey guys, I have a question, and sorry if someone already asked this...

Lets say I have three frams of Megaman (or some other generic char) WHen I put them together those three frames make Megan do a kick or something. Now how do I get those three frames under my command, in a video game sense. And to go further with that question, how do I get those three frames of that char to effect another char?

Sorry if the question is complex, basically I want to make megaman shoot a bad guy on my command and the bad guy dies as a result. thanks

Response to Actionscript codes here! 2004-10-11 16:35:54


I need script that will make a laser shoot from the Movie clip that you control when you press the spacebar.

THANKS!!!!

!!!!!!!

Response to Actionscript codes here! 2004-10-11 16:40:53


Here's a REAL helpful one: it's for people who still use startDrag(); for custom arrows in their movies:

onClipEvent(mouseMove){
startDrag(true);
updateAfterEvent();
}

//and ofcourse (in the frame's actions):
Mouse.hide();

Response to Actionscript codes here! 2004-10-11 16:43:06


At 10/9/04 04:31 PM, Frenchi wrote: Stuffs
-Frenchi

Well, if you duplicate the MC, so long as you don't use _root.health for their then you should be good with just one variable. Seeing as the MC's will stick to their own scope, they won't reach out and modify the first soldier's health variable, so just using health should work.

Response to Actionscript codes here! 2004-10-11 16:44:36


At 10/10/04 07:36 AM, Zonox wrote: Umm the Grand Theft Auto script isn't on the first page, well I can't see it at least!
Help.

FlashRegs tutorial, told you it was a good site ;)

Use that.

Response to Actionscript codes here! 2004-10-11 16:48:33


At 10/11/04 10:29 AM, Twistedsoulman wrote: megaman help!

Well, basically what you're asking for is a vague topic that'll take very long to explain, and frankly i don't have that much time. So, i'll just point you to the right direction:

Flashkit
Actionscript.org

Those two should help you out as well as the built in tutorials that come with flash.

At 10/11/04 04:35 PM, Kenji_Katana wrote: I need script that will make a laser shoot from the Movie clip that you control when you press the spacebar.

Well, this goes into the similar arena as the previous guy. It's a code that varies depending on how the user wants to set up their shooting system. Now, I'm a good AS but not the best and i'm still hazy on making a shooter system, but i will advise using the sites i gave above.

Response to Actionscript codes here! 2004-10-11 18:19:43


ok let me basic... I want to make a character and make is so he kicks when i press the "k key" on my keybord. thanks!

Response to Actionscript codes here! 2004-10-11 18:30:45


ok i'm going to do you all a big favor and teach you how to learn A/S with otut asking and with out google, and even with out flash kit...ready for this?

ok open up flash mx,

at the top there are these:
FILE EDIT VIEW INSERT MODIFY TEXT CONTROL WINDOW HELP

now click on HELP (sort of why i underlined it...)

look down the list you should see ActionScript Dictionary... Sixth one down....

now it should launch i/e and on the side frame there is A-Z Symbols and some more stuff, now go look around for codes so you dont have to ask so much...

Response to Actionscript codes here! 2004-10-11 18:44:11


At 10/11/04 06:19 PM, Twistedsoulman wrote: ok let me basic... I want to make a character and make is so he kicks when i press the "k key" on my keybord. thanks!

1) Make a MC.
2) Set the first frame of it to a standing picture of the character.
3) Put the kick sequence in frames 2-4 (assuming the sequence is 3 frames long)
4) Put a "stop();" command on the first frame of the MC
5) Put a "gotoAndStop(1);" command on the last frame of the MC (the last frame of the kick)
6) Exit the editing of the MC.
7) Place the MC on the stage and select it (single click)
8) Place the following code onto the MC:

onClipEvent(enterFrame){
if(Key.isDown(75) && !pressed){
this.play();
}
if(!Key.isDown(75)){
pressed=false;
}
}

9) Test the movie to see if the code works (hint: 75 is the ASCII code for the "K" key).
10) Work hard to finish the movie and be sure not to submit bull shit to the portal, it gets annoying.

At 10/11/04 06:30 PM, moses_man91 wrote: now it should launch i/e and on the side frame there is A-Z Symbols and some more stuff, now go look around for codes so you dont have to ask so much...

Alright buddy, I never see you helping out. Leave the n00bs alone and let me handle them. If they want to ask questions let them, it's kinda what this flash forum is about, you know. Stop badgering the n00bs.

Response to Actionscript codes here! 2004-10-11 19:34:42


Alright buddy, I never see you helping out. Leave the n00bs alone and let me handle them. If they want to ask questions let them, it's kinda what this flash forum is about, you know. Stop badgering the n00bs.

sorry man, i' just a little mad cuz a bunch of ass hole are pissing me (sorry for the languege if you find it offensive) and i was just angry and trying to help out a bit....but i guess it sounded wrong, my appoligizes

Response to Actionscript codes here! 2004-10-11 21:15:12


Alright, thanks Deathcon. The problem must be in the mouseover+space press altering the health variable. I'll check into it.

-Frenchi

Response to Actionscript codes here! 2004-10-11 21:37:44


Does anyone know how to make it were there is a circle and on the circle is a pointer that slides around only the circle, and points to the mouse?
thanks!

Response to Actionscript codes here! 2004-10-11 22:47:10


At 10/11/04 06:44 PM, Deathcon7 wrote:
At 10/11/04 06:19 PM, Twistedsoulman wrote: ok let me basic... I want to make a character and make is so he kicks when i press the "k key" on my keybord. thanks!
1) Make a MC...

OMG! Thank you thankyoU! Now , where do I find the action script codes for the other keys on the key board? Cause I now have "k" but thats it:(

Also, this I'm guessing will be harder... how do I make that kick that my guy can now do connect with another movie clip and make the guy die or something?

Thanks SOOOOOOOO much

Response to Actionscript codes here! 2004-10-12 08:32:24


I really have no idea about using actionscript.
I only ever use basic commands like stop movie or play movie.
All of my stuff is frame by frame.
Does any one know of a decent tutorial?