00:00
00:00
Newgrounds Background Image Theme

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

As3: Main

99,255 Views | 165 Replies
New Topic

As3: Main 2007-05-02 04:10:44


Well, here we go. AS3 is out, the language has changed, so it's time to start sharing what we've learnt/are learning to help others in their learning process.

As with AS: Main, please try to keep the chitter-chatter down in this thread. If you wish to suggest tutorials, post links to ones you've written, or post links to useful resources you've found on the net, then this is the place. If you wish to discuss a particular tutorial, please do so in that thread. If you have a generic AS3 question, then start a new thread.

To start things off:
AS3: Timer

And a couple of useful links:
Senocular's Actionscript 3 Tip of the Day
Actionscript 2.0 Migration
Actionscript Cheatsheet

OK then, let's get this show on the road. If you're planning on writing a tut, please try and make it as newb-friendly as possible, using the html formatting (bold, italic, underline) helps to break things up and make them more readable. We all thank you in advance for your knowledge :)


- - Flash - Music - Images - -

BBS Signature

Response to As3: Main 2007-05-02 04:35:26


Since no ones posting I will here are some sites

http://osflash.org/flash9 helped me

http://livedocs.adobe.com/flex/2/langref/ extremely useful Denvish
If you look around it has virtually everything

well I'll post more later hope this helps you guys out

Response to As3: Main 2007-05-02 04:48:45


Here are some more Denvish
http://blogs.adobe.com/kiwi/2006/05/as3_langu age_101_for_cc_coders_1.html
http://livedocs.adobe.com/flex/2/langref/migr ation.html

Also guys I didn't make these I'm just using em to help me learn
so people don't be like you thief

Response to As3: Main 2007-05-02 04:53:00


Here is pretty good one!
DevNet - Cookbook chapters

Response to As3: Main 2007-05-02 05:57:50


Response to As3: Main 2007-05-02 10:34:03


http://www.newgrounds.com/bbs/topic.php?id=69 5854

not so much a tutorial as it is a very useful resource to people that are using AS3 that despise the loss of isDown isUp like myself.

Response to As3: Main 2007-05-02 10:50:02


It looks like nobody's posted this yet: gotoAndPlay() AS3 Tutorial

Nice beginners tutorial that takes you from knowing nothing to learning about events, movieclips, the new sprite (and i think shape) class, and making a draggable soccer ball that you can throw by letting go.

Response to As3: Main 2007-05-02 11:37:43


FlashWiki : AS3

Looking forward to seeing that filled up :P.

I'll probably be able to add something to AS3:Main, but this'll be later, I need to learn this language.

Response to As3: Main 2007-05-02 11:44:23


At 5/2/07 11:37 AM, Jindo wrote: FlashWiki : AS3

Looking forward to seeing that filled up :P.

I'll be contacting people to see we can fill up these pages with the AS3 content as well. That way we will have live documents that people can edit as well.

Or feel free to dump them there too :).


Hi there!

BBS Signature

Response to As3: Main 2007-05-02 14:13:26



BBS Signature

Response to As3: Main 2007-05-02 17:23:05


AS3: Pointing at mouse.

Yay for my first tutorial!

Response to As3: Main 2007-05-02 20:04:55


Free AS3 book chapters

Adobe has links to 5 chapters out of the "AS3 Cookbook". I briefly looked them over, and it looks like there is a bunch of information for people wanting to learn the basics of AS, how to work with classes, packages, what display lists are and how to use them, etc. So if you're broke or just don't plain want to buy a book, this link is for you!

Response to As3: Main 2007-05-03 02:59:58


I didn't see this anywhere, so I thought I'd do it :P:

AS3: Custom Cursor

Response to As3: Main 2007-05-03 03:07:16


AM Laboratory

Features huge complex engines made in AS3 with downloadable source files.

This thread should become a great source of information, can't wait :)


BBS Signature

Response to As3: Main 2007-05-03 09:35:10


Okay. I know this thread's not exactly meant for requests, but I feel this forum should have one of it's geniuses write a migration tutorial.

Not a simple link to the Migration sheet, a step by step guide of how to go from coding AS2 to coding AS3 - the differences, the new thinking, maybe an introduction to why it's changed and how to remember the changes. An AS2er's Dummies Guide to moving to AS3.

Because that'd be far more useful to me at the moment than a timer and a custom cursor script will be.


...

BBS Signature

Response to As3: Main 2007-05-03 12:21:27


AS3: Springs - Another tutorial by me.

Despite the AS3: Main link fuckup, I think its quite good.

Response to As3: Main 2007-05-03 14:13:21


AS3: HitTesting

Spent a short while figuring this out, then realised it wasn't too different from AS2 ;p.

Response to As3: Main 2007-05-03 22:19:35


AS3 isnt so insanely different from AS2. Theres really no need to redo all the tutorials from AS: Main for AS3: Main unless there are significant changes. For example: hitTest --> hitTestObject
pretty significant. But pointing at the mouse and springs and crap? Theres really no point. There sould be a tutorial on event, since thats a defining feature of AS3, maybe on the mouse, and stuff on stuff completely new to CS3. Tutorials are always great, but maybe focus on the more important stuff before going into old code.

Response to As3: Main 2007-05-04 11:54:01


Response to As3: Main 2007-05-04 13:22:12


http://www.newgrounds.com/bbs/topic.php?id=69 6706

^ Using Class ID to emulate the attachMovieClip method.


Bla

Response to As3: Main 2007-05-04 18:45:32


Response to As3: Main 2007-05-04 19:43:42


At 5/3/07 10:19 PM, LesPaulPlayer wrote: AS3 isnt so insanely different from AS2. Theres really no need to redo all the tutorials from AS: Main for AS3: Main unless there are significant changes. For example: hitTest --> hitTestObject
pretty significant. But pointing at the mouse and springs and crap? Theres really no point. There sould be a tutorial on event, since thats a defining feature of AS3, maybe on the mouse, and stuff on stuff completely new to CS3. Tutorials are always great, but maybe focus on the more important stuff before going into old code

The majority of FF-goers are still in the process of learning the new Flash capabilities. As much as I'd like to be at the forefront in terms of creating tuts for AS3, I need, for financial reasons, to create some games ASAP, and AS3, despite various peoples' protestations, is SO DIFFERENT from AS2, that I can't afford to take the time to learn how to pass variables from a mouse_event to a function triggered by it, for example. Regardless of whether you personally think AS3 tuts are necessary or not, there are going to be far more (the majority of) people out there who are going to be completely confused by even such simple changes as the fact that _xmouse now is mouseX, and _x is now simply x.

Saying there's no point in rebuilding AS2 tuts specifically for AS3 is stupid, there are major changes to the language, and they affect pretty much every line of code, and more importantly, the whole structure of the language. Most of the people who come in here looking for help don't have a clue about classes or OOP, upon which AS3 is firmly based.

If you feel that you have a grasp on AS3, in advance of 'pointing at the mouse and springs and crap', then by all means share your knowledge with the rest of us, by writing some tutorials that you feel are 'worthy' of being here. Until then, stfu and appreciate the fact that others are willing to spare their time in trying to help others come to terms with what is basically a completely new version of a language.

To everyone who has contributed so far, your knowledge is vastly appreciated. The links to external help are always constructive, but your own insight (ie, tut) is always preferred. Even if a subject appears massively basic (eg, simple gotoAndPlay or _currentframe), it's worth writing it down in a form that EVERYONE will understand - not just advanced ASers, but the likes of animators who don't care too much for AS but require snippets for replay buttons, adjusting framerate, etc.


- - Flash - Music - Images - -

BBS Signature

Response to As3: Main 2007-05-04 20:24:13


At 5/4/07 07:43 PM, Denvish wrote: Saying there's no point in rebuilding AS2 tuts specifically for AS3 is stupid, there are major changes to the language, and they affect pretty much every line of code, and more importantly, the whole structure of the language. Most of the people who come in here looking for help don't have a clue about classes or OOP, upon which AS3 is firmly based.

If you feel that you have a grasp on AS3, in advance of 'pointing at the mouse and springs and crap', then by all means share your knowledge with the rest of us, by writing some tutorials that you feel are 'worthy' of being here. Until then, stfu and appreciate the fact that others are willing to spare their time in trying to help others come to terms with what is basically a completely new version of a language.

Tutorials are always good; I know that. Even better when they explain things in a clear way. Im just saying, it would much more helpful to have single tutorial on display object properites, or one on display objects in general. That tutorial would cover the shift of _x to x and all the other differences. Then a person reading the tutorial could understand how all their AS2 codes are going to need to be changed if they want to be reformatted for AS3. Also, tutorials that focused on broader topics would force people to actually understand what theyre doing, rather than just copy and paste, which unfortunately for them, many noobs do.

I didnt mean to say that all random tutorials are a waste of time. I just feel that a tutorial on Events is much more useful at this time of learning than a tutorial on something not so important. A fantastic tutorial would be to explain the differences between an AS2 script and an AS3 one that do the same thing. That way, people would understand how the language has changed and would also get some code out of it. As for OOP, I really have no idea what it is. I don't get it all, but I can code finely without it even knowing what it is. Yes I know it means object oriented programming, i just dont understand the difference between OOP and what Ive been doing in AS2. You don't need to know OOP for AS3. You don't need to know classes. You need to know the language. You need to know events and display objects and properties. What you don't need to know in order to code a game is how to use springs. Once you understand all the building blocks of AS3, you should definately move on to more advanced things, like springs+pointing at the mouse. But seeing as nobody who wouldn't know how to do those things in AS2 wouldn't already have advanced through the basics in AS3, tutorials should be written on the basics first. If you tell a noob looking to make a game where you fly a spaceship how to move towards the mouse how to move towards the mouse, what is he going to learn? How to move towards the mouse, and thats it.

Response to As3: Main 2007-05-04 20:48:54


AS3: Events

what ever I dont really care about what tutorials people make. Do what you want.

Response to As3: Main 2007-05-04 23:03:13


Ok, here's a big fat, useful one:

http://www.newgrounds.com/bbs/topic.php?id=69 6957

AS3: OOP
I'll probably make another shorter one to build up on this one.


Bla

Response to As3: Main 2007-05-04 23:57:34


In AS3 i heard that it is possible to import as2 files and use them so you don't have to recode an entire game in AS3 after writing it in AS2. Is this true, and how would you do it?


Games|1|2|3| Movies|1|2|

BBS Signature

Response to As3: Main 2007-05-05 00:08:40


At 5/4/07 11:57 PM, Nuggs wrote: In AS3 i heard that it is possible to import as2 files and use them so you don't have to recode an entire game in AS3 after writing it in AS2. Is this true, and how would you do it?

Not as far as I know.
You can import an external AS2 .swf into AS3 at runtime... But I doubt that it will receive any speed benefits from the AVM2.


Bla

Response to As3: Main 2007-05-05 00:13:57


I have a sugesstion for the naming of the new AS3 threads that will/may be linked to this.
Of course it is easy to have a centeralised thread with links to all the others. But some may fall through the cracks.

"AS3" when entered into the NG search engine is too small (minimum of 4 characters needed) and when "as3:" is entered it has no results.

Is there a standard name we can use so the lousy NG search engine will pick up these threads if we do a general search? If the search engine was better this wouldn't be an issue, and as more people will have problems as time goes on.

I think AS3 is a perfectly good name - I don't think we should change it, but...
*search*

no results

Response to As3: Main 2007-05-05 02:17:22


At 5/5/07 12:13 AM, deslona wrote: "AS3" when entered into the NG search engine is too small (minimum of 4 characters needed) and when "as3:" is entered it has no results.

That's why we search for "AS3: Main" or "AS3 Main" =P.

Response to As3: Main 2007-05-05 04:30:42


Cool stuff, got a reasonable collection of tuts already. At the moment, while the list is short, I'm not gonna be fussy about which to include - however, as the list grows, some pruning may take place. For now, though, hopefully this will make the learning process a little easier. Keep 'em coming, and once again thanks to the contributers.

AS3 TUTORIALS

AttachMovie via Class ID by Alphabit
Changing Framerate by Siggles
Custom Cursor by Jindo
Events by LesPaulPlayer
Global Buttons by ninjitsuwarrior
hitTests by Jindo
Key Input (AS2 Style) by dELtaluca
OOP by Alphabit
Pointing at Mouse by trig1
Rotate And Shoot To Mouse by Pyromaniac
Springs by trig1
Timer

OTHER USEFUL LINKS

AS3 Overview
Getting Started with AS3
Senocular's AS3 Tip of the Day
AS3 Cookbook Chapters as pdf
Flashscript.biz tuts
FlashWiki
AM Laboratories

AS3 (Flex) Language Specs
AS2.0 Migration
Actionscript Cheatsheet


- - Flash - Music - Images - -

BBS Signature