This content has been marked as final. Show 5 replies
it really isn't a good system for most non-professionals. if you want to create some modest flash content that's not going to change in the future, it's much easier to code within the authoring environment and not use class files.
i code within the flash ide all the time especially when testing something i've never done before. then for appropriate projects i take what i've learned and use oop and class files.
however, if you are creating a large complex project (and especially if you're collaborating with others), using classes and oop is very helpful. if you create lots of projects and find the need to use (and re-use) certain blocks of code, using class files can be very helpful.
and even for small projects (like my website www.kglad.com) i used class files because i knew when i started i would want to add features in the future.
in fact, this past weekend i added a new "about me" button. and that loads a bio.swf that contains 5 more buttons and each of those does something. that entire update was trivial because i had created a button class that creates the button graphics and button actions (rollover, rollout and press).
all i had to do was supply the button's label, its x,y properties and its action (load something, navigate to somewhere or execute php file).
but again, you're correct: for simple things, the extra work creating a class file isn't worth-while unless the project is large or uses multiple contributers or needs to be easily extensible.
Glad to know that I am not the only one who sometimes does it first in the IDE and then moves it over to a class.
And I agree with everything kglad said. The real value of this type of approach comes when you will be working with others.
In many ways I look at classes as being "black boxes." You put this in hear and that comes out there. The actual mechanism isn't that important. (Assuming the coding is sound in general.) So different parts of the team can work on different parts of the problem.
As for a good resource, I recommend Colin Moock's books on Actionscript. He is very good about explaining why something is done.
Speaking as a C++ programmer, I have been avoiding actionscript until now. I've always found the coding structure to be a mess. Previous versions of flash had you throwing snippets of code all over the place... the timeline, movieclips, buttons... it's just so disorganized.
With AS3 everything is finally coming together. It all makes sense now and I'm actually enjoying programming in flash.
So to answer your question, I think Adobe created AS3 to be more appealing to programmers from a more traditional background.
Thanks for the help. I guess the confusion comes because I always assume they show you the "best" way or only way of accomplishing a job. It's good to know that it's examples and not necessarily best practices. I think that was the confusing part of it all.
I guess I've been trying since MX, skipped over 2004, got 8 and now CS3. While it seems i put a lot of time into studying it, i don't have the occasion to actually put it into practice much and therefore i've never gotten much chance to really practice it.