PDA

View Full Version : Advice on learning AS 2.0


volcom
05-18-2006, 08:01 PM
Hi all,

ive been doing flash for years although not to the level that i had always wanted to.
I'm now planning on really taking my novice-intermediate knowledge to the next level and trying to get into some more hardcore coding.

i have thought about going back to school to learn more but thought id ask other developers advice on what they think the best way to upgrade your skillz would be?

Basically id really like to learn how to code "properly" and get into developing more advanced flash game/applications using 2.0 and object oriented coding.

Would it be better to focus on flash? or learn proper object oriented coding techniques using php, java, etc. and then come back to flash?

any solid book recomendations as well?

thanks for any advice

Flash Gordon
05-18-2006, 08:17 PM
Best advice I have is:

Put 95+% of you code on the timeline
NEVER EVER EVER USE onClipEVENTS
go to http://www.gotoAndLearn.com and watch ALL the free tutorials
Follow post by Xeef and watch his programing. It is very slick
Take projects that will challenge you and are over your head. This will push you to learn
Answer peoples questions here will make your own programming go smoother.


Cheers Mate! and good luck
:)

[Sx]
05-18-2006, 08:28 PM
Best advice I have is:

Put 95+% of you code on the timeline



:eek: :confused:

Most, if not all, things I do in Flash have almost nothing on the timeline apart from initial preloader and asset frames... I wouldn't recomend putting anything on the timeline, specially not the code...

Flash Gordon
05-18-2006, 08:49 PM
you use onClipEvents?????

how are you going to dynamically create an empyMovieClip? You'd have to make one in the GUI, and attach:
on(load) {
_parent.createEmptyMovieClip("foo", 1);
} I don't see how something like that has any benifits. if all of you code is on the timeline, you don't have to spend time searching for something....you know where it is.

But there you go, 2 total different approaches. Nobody will do the same thing the same thing, and it all works out.
:)

JEBoothjr
05-18-2006, 09:01 PM
I would put 99% of your code in classes.

[Sx]
05-18-2006, 11:14 PM
you use onClipEvents?????

Of course not... My .fla files mainly consists of following structure:

Frame 1: Initial preloader (little bit of code preloading the main preloader and showing 'please wait' till then) - activates after ~200 bytes are loaded.

Frame 10: Main preloader that loads the rest of the current .swf structure - usually no more than 10kb.

Frame 20 to Frame n - assets (base classes, fonts and gfx) used in the main movie.

Frame n+1 - Two lines of code:

Main.initialize();
stop();

And that's all considering Flash structure. Main class loads the config (or is hard coded into it), and then based on that data loads needed classes, libraries, and etc., links them, and initializes the system.

So apart from initial preloader, main preloader and Main class caller - I have absolutely nothing in the .fla, not on timeline, not on movie events (tho essentially I do attach component classes to dynamically created movie clips which in theory acts as onClipEvent).

Colin Campbell
05-18-2006, 11:52 PM
Hell, I never even use frames. When possible, all of my objects and design elements (text fields, etc.) are created dynamically and all motion is controlled through Actionscript. Takes a while to write, but editting anything is as simple as swapping numbers.

snapple
05-22-2006, 01:00 PM
Get the "Head First Design Patterns" book.

If i were you, if you really want to get to grips with it, get yourself on a Java course - then go back to Actionscript.

Regards, snapple

volcom
05-24-2006, 12:23 AM
thanks for all the replies and info...
the whole keeping code on one frame kinda thru me though hehe :eek:
i thought organizing your code into seperate .as files (classes) would be best?

i'll defiantely check out gotoandlearn.com, looks good

i've read up on java to get a base on the programming style, i think thats a good start although i dont think i'll learn java at this point...

i also ended up buying flash 8 actionscript bible
that and another one really got me stoked
it can be better to have a hands on book rather that just reading on the net..

again thanks all for the input

cheers