00:00
00:00
Newgrounds Background Image Theme

Chan99 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!

Learn Actionscript 3 2012

Share Collapse

Author Comments

Here is a tutorial on how to program things in Adobe Flash using actionscript. I cover the basics of actionscript and show you how to do some advanced things like keyboard movement, mouse movement and wandering movieclips. Also included is links to complete game examples as well as tutorial videos on youtube. Hope you enjoy this tutorial, if enough people want them, I can create more and show even more advanced stuff!

Log in / sign up to vote & review!

First off, thanks for creating this. Anyone who's willing to dedicate their free time to teaching others is cool in my book. I think it's a lot harder to teach something than it is to learn it. Below are my general thoughts on this tutorial. I want to stress that I may be wrong on some things, and some things are purely my opinion.

On the trace section, it's my personal opinion that every time someone codes on the timeline, rather than in a class, God smites a kitten. Though I can understand that it's much easier for a quick example of the trace function to use the timeline rather than a class.

In the variables section, not all variable types have to be classified. 'int' and 'uint' come to mind as two that don't need it.

In math, I would consider adding something about the modulo.

On Movieclips, it looks like you may have forgotten the semi-colon on the scale example. I understand that they aren't required in AS, but I prefer to use them because it makes the code more readable.

On functions, you don't specify the return value of the funtion or the privateness/publicness. I guess it's not required. I personally prefer to write my functions like public function myFunction():void {. Again, I guess it's not required. I just prefer it that way because it makes it much easier to read.

On keyboard, It looks like you use flash.ui.Keyboard. I'd suggest possibly explaining imports somewhere in your tutorial.

On mouse movement, it looks like the clicked function got cut off so that it doesn't show 'gotoy = mouseY;'. There are ways to make the circle move to the mouse position without getting to the correct x position before it's gotten to the correct y, or vice-versa. But that'd be out of the scope of the tutorial. I'd personally replace the if statements with else if's or better, a switch statement. But that'd also require adding another section for case statements.

On the wandering movieclip, I can't really read the text due to it's small size. Maybe you could bump up the size of the text and lay it out in two columns.

On game examples, I'd put a note that it opens a link in a new window. I'm a bit surprised that your site is a flash portal. I'd personally rather see a portfolio of your work, or at least a way to filter the list of games.

On video tutorials, I'd put a note that it opens in a new window. I'd also put your tutorials in a playlist and have the link go to that playlist. That way people can quickly and easily see all the tutorials at once.

All in all, I think given the constraints you mentioned, like one frame per topic, you did a great job. I think this, while not a definitive source of info, will certaintly wet some peoples' appetite for learning AS3. I'd like to see the code be a little bit more OOP. Either way, it's still cool as hell that you spent your free time teaching others.

GREAQT

not bad not bad... all of it seemed to work im not a good programmer but it is a very good tutorial.

Can u make a link to this .swf file for the people with shitty internet please?

Hey, thank you for broadening the spectrum of resources available to people starting out with Flash, but one great feature of AS3 is it's extremely fluid OOP structuring and this really reads more like an AS2 tutorial compilation.
Everything is very clumped together here, with little explanation as to what any of this code actually means, encouraging people to copy and paste. Wait, they can't because you wrote this all in static text fields so people just have to PRAY they got the code right, because they can neither understand the structure or copy-paste to ensure accuracy.
I am unclear as to your logic in this respect, because I think it is more likely that someone who DOES copy-paste your code would study it as opposed to trying to just plug it in everywhere it seems fit. And even if they do, then at least they've got the first sparks of wanting to learn.

The way you've arranged this may not only corrupt peoples level of self-confidence after finding they neither understand what they've copied or finding that it just plain doesn't work because they missed a bracket they didn't know they needed or for what.

I'm not trying to tear you a new one, or rag on you, but I think that this may prove to do more harm than good in it's current state.

So...to summarize, I think you should convert all "static" texts to "dynamic", go into greater detail (by which I mean actually explain your code, even via //comments), and give people a real foundation on which to build. Reduce the number of topics covered, or just expand on them, because frankly this looks like a really lazy tutorial.

vSmashv responds:

All the code is input text, but you are very right, it was more of a design choice and my laziness that it turned out the way it did, I had grand plans but the 1 frame per topic really limited me in explaining the processes of what is actually going on, thats one reason i included the link to video tutorials for further explaination, however those arent that great either i must admit. When it comes down to it, i did it to inspire people rather than to teach them EVERYTHING, I realize there was important things I missed but I hope people see enough that they want to grab other resources to really learn. Anyway, thanks for the review

Credits & Info

Views
4,863
Faves:
18
Votes
7
Score
2.71 / 5.00

Uploaded
Oct 28, 2012
11:03 PM EDT