ForumsProgramming ForumBasic Programing Script (for noobs)

10 3860
7432200
offline
7432200
134 posts
Nomad

Use this: it is universal. this makes it so that when you click a button. it goes to the next frame (action script 2)

stop();

btn.onRelease = function() {
gotoAndPlay(2);
};

Also a other cool Script i use is this:
var keyListener:Object = new Object();
Key.addListener(keyListener);

keyListener.onKeyDown = function() {
if (Key.isDown(Key.UP)) {
mc._y -= 15;
} else if (Key.isDown(Key.DOWN)) {
mc._y += 15;
}
};
This makes it so when you push the up and down arrow keys the clip moves up and down

  • 10 Replies
JustScott
offline
JustScott
96 posts
Nomad

noobs wouldnt really work it out they would have to understand it in sum sense

Darkroot
offline
Darkroot
2,763 posts
Peasant

Are you trying to create script kiddies? If people want to program they should learn how to, not copy paste code.

plasmafish
offline
plasmafish
252 posts
Nomad

Well since I teach this stuff I can tell you where those "noobs" will fall short.


1. They will not know what a frame is or where to find it.
2. They will not know where to put the code for the button.
3. They will not know where to put the code for the listeners.
4. They will not understand that the brackets are important.
5. They will not know what the difference is of the button frames, up, over, down, and hit.
6. What is actionscript 2?


The point is that even if they figured out what you had told them to do, they would've spent a lot of time understanding the gray areas of what you wrote up there. They will wonder what is the purpose of this code?

Stuff like this causes more confusion than clearing up for people who want to legitimately learn.

7432200
offline
7432200
134 posts
Nomad

Oh well to tell the truth i copy and pasted this from a game i made

Midmenj
offline
Midmenj
216 posts
Nomad

One thing I still don't know the code for is when the character touches an object to go to the next frame.

adios194
offline
adios194
818 posts
Nomad

I agree with plasmafish. Also "noobs" need to learn the basics, not copy and paste. If you copy and paste your stealing someone else's work. Which is against the law. So before you try to teach someone something learn something yourself. Not trying to sound mean or anything,but you probably didn't write that code either. Do you even understand it???

starfox707
offline
starfox707
4 posts
Nomad

what softwere would you use

plasmafish
offline
plasmafish
252 posts
Nomad

I agree with plasmafish. Also "noobs" need to learn the basics, not copy and paste. If you copy and paste your stealing someone else's work. Which is against the law. So before you try to teach someone something learn something yourself. Not trying to sound mean or anything,but you probably didn't write that code either. Do you even understand it???

Well, it isn't quite stealing unless it is copyrighted. But it doesn't do you any good when your flash file doesn't work and all you can say is, "That code I copied must have something wrong with it".

Building a tree house is the same concept, anyone can put pieces of wood together and nail them to a tree. But in order to support weight and be a long lasting tree house that doesn't collapse over time the builder must have a solid understanding of mechanical design.

what softwere would you use

Did you mean: Software?

Lesson #1: Grammar counts in web design.
adios194
offline
adios194
818 posts
Nomad

thks for correcting me

plasmafish
offline
plasmafish
252 posts
Nomad

thks for correcting me

No problem.

This thread can be revived if someone can successfully type up a tutorial on how to use this or some other code instead of just copying and pasting.
Showing 1-10 of 10