ForumsProgramming ForumAction Script 3.0

8 3387
kevinseven11
offline
kevinseven11
36 posts
Nomad

I am new to flash and im still learning AS3. Now my question is how does the main things work. Right now all I know by heart is how to make buttons(that are movieclips) work and how to stop the frames.
Thats It.
Can you tell me any important details about AS3 but I dont want source becuase im planing on learning it not cheating my way through.

  • 8 Replies
kevinseven11
offline
kevinseven11
36 posts
Nomad

I know im coming off as a retard but I need da help

crimsonblade55
offline
crimsonblade55
5,420 posts
Shepherd

well I would suggest you learn more about the designing parts of Flash before you try to learn AS3,as you seem to know less then even I do as of right now,and I have barely scratched the surface on AS3,and Action Script is code used to make a few things.If you want some basic codes to start off with then I guess I could tell you some you could use.

stop();

This code simply stops an animation on whatever frame you added it in.


on(release) {
_root.gotoAndPlay(2);
}

you would put this code on the same layer as the button that you want to make the play button.Now you will notice that there is a number after gotoAndPlay and that is just the number of the frame that it plays after the button is pressed,and this can be changed to any frame you want it to be.If you use this button at the end of a flash project/animation you can use it for replay buttons as well,but you will probably need to put in a basic code to stop the animation first.

on(press){
gotoandstop(1)
}


This code probably will be used more for games and web features,and it basically goes to whatever frame you want it to and stop at that frame until something else happens(such as another button is pressed with another action script code)but like the one for the play button the number can be changed for whatever frame you want it to.

These are some of the most Basic codes so if your looking for some more complex stuff I guess I could suggest could do one of a couple things.Go to youtube and look for videos that tell you how to make particular codes in animations and games,you could wait for someone else who is more experienced with Action Script, or you could look for full tutorial on coding in Action Script, you could purchase a book on Actions Script at possibly a book store, or the last option I could think of is if it is available to you that you take a course on Action Script programming.Thats all I have for you sorry if this didn't help you too much.
Erasmus_Darwin
offline
Erasmus_Darwin
59 posts
Nomad

Uh, crimsonblade55, that's AS2 stuff that you posted, not AS3.

kevinseven11, I'd be happy to help you out with AS3, but I'm really not sure what it is you're looking for. That's sort of an open-ended request.

I suppose you could check out the various classes in flash.display. Those generally account for what shows up on the screen, so they're a key part of creating stuff in Flash.

crimsonblade55
offline
crimsonblade55
5,420 posts
Shepherd

yes I realize that now,as I was busy at the moment when I posted it,and wasn't thinking about whether it was the correct type of AS code at the time.Anyways sorry about the mix up.

kevinseven11
offline
kevinseven11
36 posts
Nomad

Wait sorry, ha whats a class? Ive heard it so much and Ive just thougt I wouldnt need to know it, but somewhere I heard you have to make a custom class for a few types of games.
Thanks for the help so far

Erasmus_Darwin
offline
Erasmus_Darwin
59 posts
Nomad

A class is the definition for an object. An object is just a collection of variables and functions that operate on those variables. For example, when you make a movie clip, it's going to be an instance of the flash.display.MovieClip class (or a custom subclass that extends that class).

Here's Adobe's book on programming in AS3: (PDF)

It provides a nice introduction to classes, objects, and using them to create stuff. It's written from a Flex perspective, but if you just ignore any MXML stuff, it'll be relevant to Flash as well.

kevinseven11
offline
kevinseven11
36 posts
Nomad

That is what that stuff is on the left in the action panel. Thanks alot!
Im going to check out that PDF as well.

kevinseven11
offline
kevinseven11
36 posts
Nomad

as of how much experince, I can already make a game. Im planning on submiting it to armorgames but idk yet.

Showing 1-8 of 8