Be a Supporter!

As3: Main

  • 76,282 Views
  • 168 Replies
New Topic
Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
As3: Main May. 2nd, 2007 @ 04:10 AM

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
godsondagger
godsondagger
  • Member since: Jan. 31, 2006
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 04:35 AM

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

godsondagger
godsondagger
  • Member since: Jan. 31, 2006
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 04:48 AM

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

madness99999
madness99999
  • Member since: Mar. 1, 2004
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 04:53 AM

Here is pretty good one!
DevNet - Cookbook chapters

godsondagger
godsondagger
  • Member since: Jan. 31, 2006
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 05:57 AM

http://flashas3.flashscript.biz/AS3_tutorial/
Introduction.html

here's another tut hope you guys enjoy

dELtaluca
dELtaluca
  • Member since: Apr. 16, 2004
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 10:34 AM

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.


using ShamelessPlug; NapePhysicsEngine.advertise();

BBS Signature
ShooterMG
ShooterMG
  • Member since: Nov. 10, 2006
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 10:50 AM

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.

Jindo
Jindo
  • Member since: Aug. 30, 2005
  • Offline.
Forum Stats
Member
Level 23
Game Developer
Response to As3: Main May. 2nd, 2007 @ 11:37 AM

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.


BBS Signature
jmtb02
jmtb02
  • Member since: Mar. 1, 2004
  • Offline.
Forum Stats
Member
Level 29
Game Developer
Response to As3: Main May. 2nd, 2007 @ 11:44 AM

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
crushy
crushy
  • Member since: Sep. 17, 2005
  • Offline.
Forum Stats
Member
Level 15
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 02:13 PM

This is a pretty useful link:

http://www.senocular.com/flash/tutorials/as3w ithflashcs3/


BBS Signature
trig1
trig1
  • Member since: Oct. 4, 2005
  • Offline.
Forum Stats
Member
Level 15
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 05:23 PM

AS3: Pointing at mouse.

Yay for my first tutorial!

Pyromaniac
Pyromaniac
  • Member since: Jan. 14, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 05:37 PM

Point&Shoot and the Mouse

Trig and I both made this, but mine covers shooting as well

ShooterMG
ShooterMG
  • Member since: Nov. 10, 2006
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to As3: Main May. 2nd, 2007 @ 08:04 PM

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!

Jindo
Jindo
  • Member since: Aug. 30, 2005
  • Offline.
Forum Stats
Member
Level 23
Game Developer
Response to As3: Main May. 3rd, 2007 @ 02:59 AM

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

AS3: Custom Cursor


BBS Signature
Eggy
Eggy
  • Member since: May. 22, 2005
  • Offline.
Forum Stats
Member
Level 41
Game Developer
Response to As3: Main May. 3rd, 2007 @ 03:07 AM

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 :)

KaynSlamdyke
KaynSlamdyke
  • Member since: Jun. 25, 2004
  • Offline.
Forum Stats
Member
Level 16
Melancholy
Response to As3: Main May. 3rd, 2007 @ 09:35 AM

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
trig1
trig1
  • Member since: Oct. 4, 2005
  • Offline.
Forum Stats
Member
Level 15
Blank Slate
Response to As3: Main May. 3rd, 2007 @ 12:21 PM

AS3: Springs - Another tutorial by me.

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

Jindo
Jindo
  • Member since: Aug. 30, 2005
  • Offline.
Forum Stats
Member
Level 23
Game Developer
Response to As3: Main May. 3rd, 2007 @ 02:13 PM

AS3: HitTesting

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


BBS Signature
LesPaulPlayer
LesPaulPlayer
  • Member since: May. 18, 2006
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to As3: Main May. 3rd, 2007 @ 10:19 PM

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.

ninjitsuwarrior
ninjitsuwarrior
  • Member since: Apr. 28, 2006
  • Offline.
Forum Stats
Member
Level 24
Game Developer
Response to As3: Main May. 4th, 2007 @ 11:54 AM

AS3: global buttons

Alphabit
Alphabit
  • Member since: Feb. 14, 2006
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to As3: Main May. 4th, 2007 @ 01:22 PM

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

^ Using Class ID to emulate the attachMovieClip method.


Bla

Siggles
Siggles
  • Member since: Apr. 7, 2006
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to As3: Main May. 4th, 2007 @ 06:45 PM

AS3: Changing Framerate

My tutorial

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to As3: Main May. 4th, 2007 @ 07:43 PM

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
LesPaulPlayer
LesPaulPlayer
  • Member since: May. 18, 2006
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to As3: Main May. 4th, 2007 @ 08:24 PM

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.

LesPaulPlayer
LesPaulPlayer
  • Member since: May. 18, 2006
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to As3: Main May. 4th, 2007 @ 08:48 PM

AS3: Events

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

Alphabit
Alphabit
  • Member since: Feb. 14, 2006
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to As3: Main May. 4th, 2007 @ 11:03 PM

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

Nuggs
Nuggs
  • Member since: Dec. 17, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to As3: Main May. 4th, 2007 @ 11:57 PM

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
Alphabit
Alphabit
  • Member since: Feb. 14, 2006
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to As3: Main May. 5th, 2007 @ 12:08 AM

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

deslona
deslona
  • Member since: Jul. 1, 2004
  • Offline.
Forum Stats
Member
Level 34
Blank Slate
Response to As3: Main May. 5th, 2007 @ 12:13 AM

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
Jindo
Jindo
  • Member since: Aug. 30, 2005
  • Offline.
Forum Stats
Member
Level 23
Game Developer
Response to As3: Main May. 5th, 2007 @ 02:17 AM

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.


BBS Signature