Mike Chambers

code = joy

Is ActionScript 2 Development Faster than ActionScript 3 Development?

with 124 comments

I got a ton of feedback in response to my question about the continued use of ActionScript 1 and 2. One thing that consistently came up was that some felt that it was faster to develop within ActionScript 2 than 3. However, it wasn’t clear from the commenters if this was because they already knew ActionScript 2 and were not as comfortable with AS3, or if there were things that were just harder / more tedious in ActionScript 3.

So, my next question is : do you think ActionScript 2 development is faster than ActionScript 3 development? If yes, do you know ActionScript 3 already? Can you give specific examples of things that you feel are faster / easier in ActionScript 2 (for example, playing a sound, or working with events)?

Post any input in the comments.

Written by mikechambers

October 29th, 2008 at 9:04 am

Posted in General

124 Responses to 'Is ActionScript 2 Development Faster than ActionScript 3 Development?'

Subscribe to comments with RSS or TrackBack to 'Is ActionScript 2 Development Faster than ActionScript 3 Development?'.

  1. AS3 is economics ;)

    Pablo_aSH

    29 Oct 08 at 9:05 am

  2. Well I have a question for you. Even if some say AS2 is faster to develop in, is it not possible to create better richer things with AS3 despite it’s required work hours?

    Matt Lewis

    29 Oct 08 at 9:10 am

  3. Well, some –usually small–projects could arguably be faster to develop in AS2.

    I did a tiny project yesterday: it loads a .jpg and does a cross fade… fading out the previous .jpg. Loading the list of XML was sooo much faster in AS3 because I didn’t have to parse it–but to get the cross fade to work on loaded assets I ended up making a bmp of the current image before loading the next one.

    That’s just one example… my other one is playing a sound and changing the volume.

    So, yeah, these are pretty focused. And, truth be told, I wouldn’t want to do them in AS2 just because that’s more things to remember. But… I remember making prototypes faster back when AS2 was my main tool.

    What’s the point though? No one wants to go back… and if they do, they can!

    Phillip Kerman

    29 Oct 08 at 9:12 am

  4. I don’t think there’s any question that AS3 is definitely more verbose than AS2. For some things slightly more so, for some things, a lot more so. So for a long while I often used AS2 to spike some idea because it was quicker to dash off a quick concept in AS2. But in the long run, I think it does come down to what you are comfortable with. After I got more comfortable with AS3, I could spike some idea just as quickly with it. I mean how long does it really take to type “addEventListener(Event.ENTER_FRAME, onEnterFrame);” – especially when you’ve written it 1000 times, and you have code hinting? It’s like an extra 3 seconds.

    When you start to get into large applications, I also don’t think there’s any doubt that the better practices that AS3 was created with make it possible to make much more complex applications with a lot less debugging and hair tearing.

    Keith Peters

    29 Oct 08 at 9:15 am

  5. As I’ve become more and more familiar with AS3, I’m finding I have started putting out prototypes faster than I did with AS2. This may be in part because I’m utilizing OOP practices more with AS3. As I’ve got more comfortable with both and a few design patterns, I find I can get an idea up and running quicker than I could with AS2. I’m also finding my projects scale easier.

    Case in point, I just did a functional game prototype with plants that rise and fall spitting out seeds that you need to pick up with your hovering robotic harvester. The prototype has gravity, drag, wind, particles, code-based tweening, event dispatching, collision detection and similar. It took less than 8 hours to put together and tweak for the client. Something like that would have taken me nearly twice as long in the usual AS2 way I was doing before.

    Gary Wilson

    29 Oct 08 at 9:20 am

  6. @phillip


    What’s the point though? No one wants to go back… and if they do, they can!

    Well, we could potentially have better documentation, or make people aware of the existing resources.

    Or there might just be misperceptions around ActionScript 3 which we need to address.

    Finally, there might be other things we can do to ease the transition (maybe something like a simple framework that makes it easy to play a sound and adjust its volume ;) ).

    Anyways, right now Im just trying to get some information to make sure I understand where people feel the issue is.

    mike chambers

    mesh@adobe.com

    mikechambers

    29 Oct 08 at 9:23 am

  7. It’s an interesting thought. I’ve definitely noticed that projects are seemingly taking longer to complete since I switched over to AS3 about 6/7 Months ago but I’ve not been able to pin point where the time is being spent.

    Anton Mills

    29 Oct 08 at 9:28 am

  8. I charge more on project based gigs for AS2 stuff. I have to roll my own event management, bring back mx.utils.Delegate, and some custom stuff I have to handle myself where AS3 sometimes has a solution for it already.

    So…no. I’m experienced in both but am definitely faster in AS3 than AS2 and faster in Flex and Flash CS3.

    John C. Bland II

    29 Oct 08 at 9:30 am

  9. For me at least, AS3 development is a lot quicker than AS2. It think it probably comes from the fact that I find AS3 to be so much more comprehensible than AS2.

    Sure there’s the age old button example, but I find the AS3 API to be infinitely more easy to understand.

    To put it this way; When presented with a new problem, I find it easier to “guess” the solution based on what I already know in AS3.

    As for suggestions regarding documentation; Fix an API for LiveDocs. I recently wanted to make an iPhone app (or just an iPhone version) of LiveDocs, but that horrible frame-based HTML doesn’t exactly welcome that kind of prospects.

    Martin

    29 Oct 08 at 9:39 am

  10. And … even Flash 10… for 3D.
    I will be at http://papervision.proj.com seminar to show speed of Flash 10.

    netsql

    29 Oct 08 at 9:50 am

  11. AS3 hands down. (background: I started in flash 4 and have written tons of as1 and as2).

    To be fair, a big part of why as3 is faster is the tools. I use FB3 and FDT3

    Trevor

    29 Oct 08 at 9:55 am

  12. I find AS2 is often faster for small, simple projects that don’t demand much complexity.

    As soon as something becomes “complicated,” I feel that AS3 ends up being faster and working better.

    It becomes faster because most classes and methods behave the way I expect them to in AS3, and so I spend less time in the help file.

    The code also looks cleaner in most instances, and this makes it easier to scan through it and make changes.

    More so than that, I find it much easier to debug work done in AS3. When you’re working with multiple thousands of lines of code, this is VERY important.

    ian

    29 Oct 08 at 9:58 am

  13. Let’s be honest AS3 is technically more to grasp. It’s not unreasonable to think people “feel” AS2 is faster because it is much less to comprehend. I would say the number one reason AS3 “feels” slower for prototyping is the awkward use of the timeline in AS3, it just feels so wrong. Poor syntax completion / highlighting are also big culprits for Flash. Flex is great but that also has overhead when creating your Project. The days of opening up the timeline and coding up some greatness are a little different now.

    That said I will take AS3 structured and organized code over the AS2 crazyness any day.

    Justen

    29 Oct 08 at 10:00 am

  14. I liked the freedom from as2 because it’s (like lingo) a not very strict language. It also had the intention to animate playfully the design and content and is less focused on the structure of the script. For me Flash is not something where you create business applications or e-commerce websites. It’s a design tool. (Flex is a different story)

    I still use as2 and as3 and for me they both have benefits, if I work alone and I know as2 will get the job done by simple say onRelase on a movieclip, why would I even consider doing it with as3 where everything has to be strict and where i have to write event handlers like hell (inc. additional properties like buttonmode, mousechildren, etc.)?
    Many people said it’s less work to code and often I have the same experience, simply because you write less code, and not because you aren’t comfortable with as3.

    On the other hand, if I work within a team were classes are passed through or on a project that requires structure for easy editing, than of course as3 is much better. Also in therms of re-using code as3 has all the benefits. re-using classes is really awesome. as3 is maybe harder to set up with the classes and all, and possibly requires more attention because of the structure from the site or application. But it’s diffently worth it when editing, revising, debugging or sharing the code.

    I also know that in terms of performances AS3 is much better. I did experience this with the use of Papervision, but other than that… doesn’t made such a big difference for me.

    In the end, I just look at what a project requires and pick the languague based on the needs of the project and what gives me the most benefits as a designer/scripter.

    f

    29 Oct 08 at 10:03 am

  15. For spiking ideas, i’d say yes AS2 FTW.

    AS3 is way better in the long run.

    stacey

    29 Oct 08 at 10:19 am

  16. For a while I agreed with the premise that it was still faster to prototype and “throw something together” in AS2, but as I have become more comfortable with the event model and new syntax I now hate to have to go back and do anything in AS2.

    I would agree that the complexity of a project is directly proportional to the need to use AS3. If you’re doing an example as Phillip’s, there’s not as strong a case for it. I work for a Flash game company and AS3 has definitely cut down on my debugging time. If I were building banners all day, I probably wouldn’t care one way or the other.

    Chris Griffith

    29 Oct 08 at 10:22 am

  17. I know this question is more geared to those who believe AS2 dev is faster and why they feel so, but AS3 is faster, more mature and may be misunderstood by some who feel more comfortable with AS2.

  18. I think a lot of the perception that AS2 is faster comes from the few extra lines of code needed to write mouse handlers and loaders. Beyond that, the error reporting and advanced data structures alone are a huge boon to dev time.

    One of my biggest problems in AS2 was trying to keep track of scope and when to Delegate (or pass scope references into closures) – In 3 I don’t even think about it, everything just works as expected…it’s a few more lines of code but I save hours of debug.

    Rob

    29 Oct 08 at 10:23 am

  19. @stacey


    For spiking ideas, i’d say yes AS2 FTW.

    Why? Any examples?

    mike chambers

    mesh@adobe.com

    mikechambers

    29 Oct 08 at 10:32 am

  20. I have a counter question: develop what?

    If we are talking about a project made of less than 1000 lines, probably as2 is still faster, but I think just for the first releases.
    My point is about maintenance.
    How long does it take to make a _substantial_ modification to a big as2 project? A lot, especially if you don’t use an mvc framework and you don’t write some documentation.

    AS3 forces you to be more organized. With AS3, at the beginning you have the feeling that you have to type a lot, to get what you want. But if that typing is organized (some UML or some MVC) future modifications will be much less painful, especially in a team programming scenario.

    Finally, if Flex wants to be a tool for programmers, it needs a programming language. Somebody (those more traditional ;) would not even call as2 a programming language.

    Just my 2 cents.

    funkyboy

    29 Oct 08 at 10:41 am

  21. Mixed…

    I think architecturally AS3 is a better path. I also think the OOP paradigm is a big one to wrap your head around if you’ve not been using it beforehand.

    The event based model, can sometimes make simple tasks more cumbersome. (ie: I used to say, click and run this function, now I have to add event listeners, create events, etc. I used to be able to just loop and wait for something to be done, but now in certain circumstances I need to loop, create a listener, have the listener fire and then stop the loop.) All that said, this is the present direction of programming.

    And the Eclipse based editor for Flex is world’s about the old Flash environment for programming purposes.

    That said, I think AS3 and Flex fall flat on some aspects. In particular, styling. This becomes a constant research or memorization task. Is that a property or is that a style. Okay, it’s a style, what is it, what is it’s values, etc. Back to references.

    And I do confess a preference for dot notation, preferring:

    thingamabob.style.background = [0xFF000,0x33000];

    versus

    thingamabob.setStyle(”background”,[0xFF000,0x33000]);

    But either way, a little auto-population would be nice.

    Jason The Saj

    29 Oct 08 at 10:44 am

  22. I teach at the Art Institute of Portland, and we just finished finally transitioning our Flash classes from AS2 to AS3. In that transition, I fielded a ton of questions from students on why we’re using or not using one version or the other, or how one is preferable to another.

    There is definitely a perception that AS3 HAS to Object-Oriented and that it’s far more complicated, which I’ve always tried to debunk. Somehow AS3 got the reputation that it’s harder and more verbose and only works in an OOP context.

    I would suspect that a majority of people who say AS2 is faster to develop with are saying that because they haven’t gotten over the learning hump with AS3, and are falling prey to these misconceptions about AS3.

    Dru Kepple

    29 Oct 08 at 10:45 am

  23. hi Mike,

    little thing but instead of:

    import flash.net.URLRequest;
    var url_request:URLRequest = new URLRequest(”http://www.myurl.com”);
    navigateToURL(url_request);

    have:

    navigateToURL(”http://www.myurl.com”);

    i.e first param could be a String or a URLRequest. if a String it gets converted to a URLRequest automagically…

    paddy

    29 Oct 08 at 10:46 am

  24. as one who has done tons of development in as2 and as3, i cringe any time a client asks me to touch as2 code. It takes me much more time to do ***anything*** in as2 than it does to do the corresponding task in as3.

    jeff tapper

    29 Oct 08 at 10:49 am

  25. Well, definitely AS3 is faster to develop. In AS3 you can control objects better than AS2. And I believe this is perfect for developer because if you can control objects better you can do what ever you want faster and better. Also codes are much cleaner than AS2.
    So AS3 is better than AS2.

    Engin Yöyen

    29 Oct 08 at 10:53 am

  26. I don’t think AS3 is any slower than AS2, I feel the people who say this are simply not confident enough using AS3 and so hit more problems with their code and thus the project as a whole gets blamed on the fact that it is built using AS3 rather than the programming not having a good enough grasp with AS3!

    Mark McDonnell

    29 Oct 08 at 10:59 am

  27. Correction:

    “rather than the programming not having a good enough grasp with AS3!”

    should be

    “rather than the PROGRAMMER not having a good enough grasp with AS3!”

    Mark McDonnell

    29 Oct 08 at 11:00 am

  28. Hi Mike,

    I think I know where you are going with this. I would say that having some simpler APIs on some of the more complicated tasks would help AS3 development for people trying to get something done quickly. Not sure if that really has much to do with AS2 though, and the way things worked in that language. Sorry that I don’t have any suggestions on what specifically the APIs could/should be, and perhaps it’s better for the community to create those rather than Adobe. Certainly Papervision3D, Box2DFlashAS3, GO, GTween, Jedai, etc are simplifying 3D, physics, animation scripting etc… already.

    Strong typing is an area where I think new comers to AS3 get confused too. It might be worth Adobe looking into dynamic typing like haXe has to simplify it, and that perhaps will save some typing when coding as well.

    However, all the tools, proper debugging, runtime errors, strict data types, consistent event model all make AS3 much easier and faster to develop with.

    -Chris

    Chris Allen

    29 Oct 08 at 11:03 am

  29. AS2’s wonky scoping and clunky XML interface, combined with that fact that almost all of my scripting ties into XML in some way guarantees that AS3 is going to be faster. And as has been mentioned, a prototype that’s marginally faster in AS2 wouldn’t help much as you’d most likely lose any time you gained once you tried to expand it. I’ll throw my hat in with all the others that cringe now when forced to develop in AS2.

    Aaron Leavitt

    29 Oct 08 at 11:06 am

  30. The question in this article’s title is somewhat of a trick question.

    Let’s say you are an accomplished AS2 developer. With this, you probably have a “resource” or library of snippets, utilities and classes.

    If you are transitioning over to AS3, odds are that you are essentially starting from scratch. So yes, you would be disadvantaged. You WOULD develop things slower.

    Now, lets put things on an even keel. Six months down the line, you are a bit more prepared for your up and coming AS3 project.

    HERE is why things will be easier to develop, and faster – in AS3:

    - Debugging, Debugging, Debugging

    Once you put a “system” with AS3 – with how you go about developing an application. Things get much easier. You are more aware and informed of bugs that arise, solely based off the runtime error messaging the flash player provides for AS3.

    There is a lot more to be said about that, but I wanted to keep it short.

    Steven Hargrove

    29 Oct 08 at 11:12 am

  31. It’s quicker for me to develop in AS2 because (as I mentioned in your last blog post) I don’t know much AS3. Also, AS3 is more verbose, and having to include every package I need slows me down. However, with that said, I have no doubt that over the long run maintaining a project will take LESS time/work if it’s done in AS3. I’ve fallen in the “quick & dirty” pitfalls of app development too many times, only to be bitten in the ass later when I have to add functionality or bug-hunt.

    Steven

    29 Oct 08 at 11:15 am

  32. It depends on:

    a) What you are trying to achive
    b) What language you are better at.

    I find that AS3 is better that AS2, but not for prototyping. Adding event listeners in AS2 was easier and quicker that AS3 so this was better for quite ‘n’ dirty stuff.

    Harry Northover

    29 Oct 08 at 11:17 am

  33. There has been a large push for oop in as3 which was necessary I think we need to see a push for dynamic programming in as3 aswell.

    Brendan

    29 Oct 08 at 11:30 am

  34. AS3 hands down, though I’m very familiar with it. I have done very little AS2 development ( finished the one project I was on that was in AS2 and that was the last thing ) since AS3 has come out.

    I’ve been a programmer since the Apple II days and worked with flash since 4. The practices that AS3 makes possible and encourages over AS2 save me TONS of time. Things like being able to have a simple Application Mediator to dispatch true events ( and custom events that are more than just generic objects ) to encourage de-coupling is simply fantastic for development and debugging.

    I also use FlashDevelop religiously and have adapted templates for a few different type of projects and classes, so it’s a quick click for a new proof of concept project or a new “full-bore ™” project or adding a new Event or new Model class, etc. Even my proof of concepts can be developed in a matter of minutes just like it used to be with AS2.

    Mike J

    29 Oct 08 at 11:39 am

  35. Is AS3 faster? Only for programmers who get it.

    AS3 requires a deeper understanding of programming (esp OOP), which makes it much slower-going for people who aren’t formally trained in OOP techniques and who don’t have experience with OOP languages like Java or C#. As others have said, it’s more verbose, requires packages and understanding of inheritance, etc.

    I have no doubt that AS3 is more powerful — and for complex projects ultimately makes code management easier — but it’s harder for novices to get their heads around it, which makes it slower for the average user.

    philip

    29 Oct 08 at 12:09 pm

  36. well, AS3 is not the next version of AS2. It’s completely new language, which has more resemblance to Java than to AS2. In fact it’s using separate virtual machine to run it, which is bundled with old virtual machine and not replaced by.

    Basically comparison between AS2 & AS3 is irrelevant. It even brings confusion. In fact it is easier to learn AS3 without knowledge of AS2 rather than learn by comparing it to AS2.

    In my opinion Adobe made a big mistake by marketing AS3 as the next version of AS2. They should just name it differently and make it as a separate product similar to Flex.

    While I am at it, let me point out a couple of observations. In general websites made with AS3 are not faster. I agree some effects are faster, but the overall website experience is weak compared to the website made with previous version. Initializing, slow click mouse response & “jerkiness” contribute to bad user experience and annoyance of users with Flash.

    Lately I’ve see a lot of Flash developers with AS2 background are switching to different platforms such as Objective C, Ajax or WPF rather than advancing themselves to AS3. The future of Flash doesn’t look very promising.

    Vitaly

    29 Oct 08 at 12:25 pm

  37. I think I can say I “get” AS3 and I still can see many places where it’s not only more verbose but it’s arguably over-engineered. I mean, really, (besides audio) what’s up with having to listen for events on a Loader’s contentLoaderInfo but right on the root of the URLLoader? Somebody got a little too crazy with the architecture in places.

    I do think it’s fair that anyone who gets AS3 would never want to go back to AS2–myself included. I would pick up AS2 for very quick prototypes but I’d hate to have to rework stuff when the project scales.

    When people say AS3 doesn’t HAVE to be OOP I immediately think about all the craziness you have to do (and do differently) if you code AS3 in the timeline. Most people laugh because you’d never do it that way–but remember, this is in response to those who say you don’t HAVE to use OOP. There is a seemingly mysterious (and as far as I can tell undocumented) set of random rules that Flash uses for code in the timeline… like someone already did a import flash.events.* but not import fl.controls.*?

    So, say you start with this craziness in the timeline (using AS3) then migrate to OOP… you’re back to learning so many new rules that you’re no better off than if you started with AS2 (well, almost).

    It’s not that bad, I’m just saying you can’t say AS3 is easier, that it doesn’t require OOP, or that it’s less verbose unless you qualify the cases where it does or doesn’t apply.

    Finally, I do think to maybe re-phrase what some have said about those who think AS3 is “harder” just don’t know AS3 (to which I disagree)… I think maybe it’s better to just say AS3 is harder if you know AS2… and have that baggage.

    Phillip Kerman

    29 Oct 08 at 12:31 pm

  38. I definitely think AS3 is much faster and much cleaner. Although I did have my doubts when I first got a sneak peak at AS3 a while back when it first came out, there was just something about the structure that took some time getting used to. Things like:

    myBtn.addEventListener(MouseEvent.CLICK, listener);
    function listener()…

    Instead of being able to bang out the entire thing like:

    myBtn.onRelease = function()…

    But in the end, AS3 all the way.

    Carlo

    29 Oct 08 at 12:32 pm

  39. Well, using Flex Builder 3 and ActionScript 3 is most definitely faster than TextMate and ActionScript 2…

  40. in my opinion procedural as1 developing is way faster in many little projects than using oop. you can try some nice tricks just by writing a few lines and see the visual result directly without creating classes. this is very useful for creating websites with much visual stuff ans effects.

    when it comes to managing complex data in bigger projects, OOP is the way to choose. in these cases the planning phase is much more important. In those projects the fnctionality and data-handling is mostly more important than the visual stuff.

    so:
    For nice cool small websites with fresh and creative stuff I like AS1.
    For data-management and business-applications I use OOP.
    When I use OOP then I use AS3 of course ( and also MXML), I don’t use AS2.

    jellix

    29 Oct 08 at 12:45 pm

  41. For me AS3 development is way faster than AS2. The two primary reasons for that are, as many have mentioned already, the tools – Eclipse/FB – and the enhanced OOP of AS3.

    It’s mainly the tool that speeds things up so much. In FB if I’m in the middle of a block of code and think, “I should break this bit out into it’s own class/object.” then I can create folders and files right there without leaving FB. And the package structure is populated for me which saves time and the possibility of typos.

    To do the same thing in AS2/Flash IDE I’d have to go to Windows Explorer, create the .as file, open it and get a blank document. In the 30 seconds that it takes to do that I’ve lost track of exactly what I was doing and have to mentally shift gears again. It just becomes a barrier to being effective and productive.

    polyGeek

    29 Oct 08 at 12:47 pm

  42. AS3 is bad for Flash applications – great for Flex applications. This is because Flex has a much better groundwork laid for working in OOP methods, as well as for true programming.

    Flash, on the other hand, is about the timeline, about procedural coding. To do procedural coding in AS3, while possible, is very cludgy, and you end up writing a lot more code than you would need to in AS2. In AS2 if I want 3 objects to listen for a click, and all do the same thing it is as simple as saying obj1.onPress = obj2.onPress = obj3.onPress = function(). That same thing in AS3 is: obj1.addEventLIstener(MouseEvent.CLICK,doPress); obj2.addEventListener(MouseEvent.CLICK,doPress); obj3.addEventLIstener(MouseEvent.CLICK,doPress); function doPress(evt:MouseEvent):void Somebody look at that code and tell me that it was faster to do in AS3.

    At the same time, the strictness of AS3 allows me to write less functions, because the functions I write are more versatile, and can be used by any object. The display list methodology of AS3 works wonders when I want to have objects that persist but aren’t displayed. The added functionality that you get when working with AS3 all makes it worth it, IF you are using that functionality. For simple projects AS2 is MUCH faster to work in. For ANY Flash IDE project, AS2 is faster to work in.

    AS3 executes faster than AS2 because of the strictness, but that same strictness makes it annoying to program for. I don’t like seeing errors when I compile, even if they are just warnings. AS3 generates a lot more warnings than AS2 because of the strictness. The code:
    private function setString(value:String):void {
    _aString = value;
    }
    generates a warning that “value” might not be a String – despite it being typed as a String in the function init. That function init states that anything you send into this function is required to be a String, so I should not have to type the var inside of the function, as it is typed coming in. This is something that makes absolutely no sense to me, as a programmer, as a developer, as a designer.

    Flash needs better tools – pre-canned code, automatic code completion, etc – to enable non-programmers to work with AS3. For the time being, AS2 is faster for me, but I am striving to work exclusively in AS3 regardless. I am hoping that as I become more comfortable with AS3, and OOP, I will find that it becomes as easy to work with as AS2.

    Also, AS3 takes a lot more time at the beginning of the project. I find I need to spend a lot of time figuring out how the project needs to be built, what classes I can re-use, what classes I need to extend, and what classes I need to write from scratch. I find that many of the pre-built components in AS3 are lacking in functionality from their counterparts in AS2 (some missing entirely), and others have a lot more functionality, but it is very poorly documented. I find myself constantly extending classes to do something that they can already do, mainly because of poor documentation.

    Ross

    29 Oct 08 at 12:48 pm

  43. AS3 does require more code in many cases, but sometimes this only hits you once. I wrote a class in AS3 to handle keypresses in the same way as the old Key.isDown();

    http://www.brokenbutton.com/blog/2008/09/return-of-key-class-to-actionscript-30.html

    It bothered me at the time that I had to use a custom class to replace one line of AS2 code, but now it’s written, it’s done and I no longer have to worry about it.

    AS2 will lose any edge it has once I’ve built a big enough codebase in AS3, and can write it without consulting reference material every time I hit a bug.

    John

    29 Oct 08 at 12:58 pm

  44. I remember being very confused when I learned AS2 when searching how to write a roll over because every example was different; there is like 3 ways to do it.

    I also don’t get why people think you have to learn OOP to use AS3, what you have to learn is the event model, once you got that, your all set. You already understand the relation between parent and children because you used to type _parent all the time in AS2.

    AS2 also permitted you to be fast and dirty (and lazy). You could, let say, make a function that set masks for some movieclips. You could call that function anywhere on the timeline even if some of the movieclip weren’t on the stage on the frame that the function was called. In AS3 this would give you a run time error…

    But for me, every day I don’t do AS2 is a good day.

    zedia.net

    29 Oct 08 at 1:06 pm

  45. -
    Somehow AS3 got the reputation that it’s harder and more verbose and only works in an OOP context.
    I would suspect that a majority of people who say AS2 is faster to develop with are saying that because they haven’t gotten over the learning hump with AS3, and are falling prey to these misconceptions about AS3.
    -

    I guess that’s me!
    I’m a designer & developer, still trying to bridge that gap. But I have been programming in AS1/2 for years and years now, AS3 feels like Adobe hates me. My old habits aren’t allowed in AS3. If you write your code, not in classes, but in movieclips and as simple as possible, AS3 is an enormous step to overcome. It feels like i’m hacking the OOP “rules”, and i’m certainly just doing that. However, the AS3 syntax is a big improvement… , performance is mind blowing, … , but at what costs?

    I did some small AS3 projects. Even the small things cost me a lot of work, searching how to get around the AS3 boundaries. And i’m not talking Classes… i hate those things! In my experience, 90% of all flash websites are just small programs. I see developers setting up their framework to do some simple tasks, by the time they are ready to go, my simple project is finished. Yeah I know, i know, i’m not blind… i can see the benefits of it all. But knowing when to use what is important. And for what i’m doing, AS3 -frustratingly- isn’t the best option. :(

    bmwmb

    29 Oct 08 at 1:22 pm

  46. I feel AS3 has more built in features that simplify some of the more complex tasks that were common for developers. E4X for example is much easier to use then the complex conditionals and looping that was required for parsing XML in AS2. Then there is the display list. The ability to reliably control depth of symbols on stage without some custom schema for level management or the need to store everything in Arrays in my view was worth the upgrade to AS3. Loading data in to flash and posting it back to a server to me is more intuitive in AS3.

    Some may find strict typing cumbersome; however I find it makes debugging applications a bit easier. That is not a unique experience from AS2 only now that it is more or less requirement in AS3 makes it easier to debug another user’s code. It also forces me to focus more are the architecture of my code before I start building an application. That I find encourages me to use more OOP and polymorphism, which leaves me with classes I can leverage in later projects.

    Using events, especially in the context of components and cell renderers in my opinion is both easier to use and provides more intuitive control over the event chain then was possible in AS2. Creating custom events is also less code then before.

    I feel AS 2 was good for small projects with straightforward objectives. Developing the same projects in AS3 sometimes require a little more code but as the project gets bigger I feel AS3 allows you to do more with less. It does require however an “AS3” approach to problem solving to know how to be the most efficient. Using your old bag of AS2 tricks can lead you astray. I think it’s that desire to hold on to what you are used to that makes AS3 seem more cumbersome.

    Ken

    29 Oct 08 at 1:35 pm

  47. @bmwmb


    If you write your code, not in classes, but in movieclips and as simple as possible, AS3 is an enormous step to overcome. It feels like i’m hacking the OOP “rules”, and i’m certainly just doing that. However, the AS3 syntax is a big improvement… , performance is mind blowing, … , but at what costs?

    Thanks for the input. AS3 does not mean OOP. Just as in AS2, you can write both procedural and OO code. Its your choice.

    mike chambers

    mesh@adobe.com

    mikechambers

    29 Oct 08 at 1:40 pm

  48. A case came up a couple of days ago which made me ponder the same question.

    In class we had an assignment to create a small ecommerce site, loading and parsing a plain text file, listing categories (with a ‘view all’ option), product list view, product grid view, paginated results and a shopping cart. Nothing fancy.

    As far as programming goes, its a beginner’s course, the exercise in question was a test for the lesson’s on Arrays taught with AS2. For my part I have been programming for 5-6 years and have been using AS3 for a little over a year (I’m a student working an aprenticeship).

    At the end of the day most people had implemented maybe two thirds of the functionality with quite a bit of buggyness. I had implemented everything except the shopping cart and it was rock solid (I borrowed more than a few concepts from Flex)

    So at the end of the day, a more experienced programmer using AS3 built a more stable app than beginners with AS2, but the feature set was rougly the same.

    On the other hand no one got round to propley debugging their app, and no one significantly re-used any code from the previous week’s lessons. So as far as initial coding time is concerned maybe AS2 code is faster to write, but in the long run when you want to reuse code or have to revisit a project, AS3 is much cleaner, faster to reuse and better if you are worried about your blood pressure ;-)

    Robin Lambell

    29 Oct 08 at 2:01 pm

  49. @mike
    -
    Just as in AS2, you can write both procedural and OO code. Its your choice.
    -

    I don’t feel like you have the choice anymore. Do you actually understand how old skool flash developers code? ;) The “easy” stuff quickly becomes difficult when you’re going one step further. Static classes, stuff like that which doesn’t allow me to do things that are allowed in AS1/2 always annoy me in the process. I’m using Flash since ‘98 and it’s the first time that i’m having problems adapting to the newest technology. @Phillip Kerman, kudos!

    bmwmb

    29 Oct 08 at 2:30 pm

  50. Shew, this is really quite a complex matter. Myself, I found AS2 a nightmare, particularly with regards to scope, and I’ll never go back. I’m at least 10x more productive with AS3. And the performance is great.. BUT..

    I built some mini apps for a project that went terribly wrong because no one else had any experience with AS3. I insisted on AS3 because it was the only way I could build my apps in time – and the apps were the most complex and important part of the project. The biggest problem in the end was performance!

    The apps themselves were solid and efficient, but the project they were loaded into (outside of my control) completely crippled them, and the whole thing ran like a jerky, lumpy, bloated monstrous mess – even on high spec machines. Why?

    Really bad AS3 timeline code. Hundreds of event listeners copy-pasted onto every frame, often stacking up inside loops. Externally loaded clips not getting properly removed and piling up in the background. Navigating the site caused more and more junk to stack up until the whole thing fell apart. It was really disappointing.

    I used to try to convince everyone I knew to switch over to AS3, but not any more. I feel that weak developers can do a lot more damage with AS3 than with AS2.

    shaun

    29 Oct 08 at 3:02 pm

  51. @mike

    “Just as in AS2, you can write both procedural and OO code. Its your choice.”

    I understood from the beginning that I would be able to write both procedurally and OO with AS3. The reality is that procedural code is difficult to implement with AS3. AS3’s ties to OOP force the programmer to switch mindsets to OOP style programming just to write procedural code. AS2, on the other hand, was built for procedural code. Its ease-of-use is unmatched when compared to AS3 for procedural style work. For OOP, AS3 is much better, and is definitely more powerful, and better featured.

    Ross

    29 Oct 08 at 3:10 pm

  52. Didn’t Colin Mook write something along the same lines recently (http://www.insideria.com/2008/07/the-charges-against-actionscri.html)?

    AS3 does take longer to develop but the trade off is that its much easier to manage and in the long run it takes much less time. That said using a decent IDE (FDT personally) I can write AS3 code much quicker than I could writing AS2 code, but maybe thats more of a comment of the lack of good AS2 IDE’s out there…

    Matthew Lloyd

    29 Oct 08 at 3:46 pm

  53. The problems that always slow me down in AS3 are the DisplayList, deleting objects and now the help files.

    I understand the merits of the DisplayList and I’m really pleased that it has been changed, however I think the API is a bit to unforgiving. What I don’t like is if you attempt to reference a DisplayObject that doesn’t exist, or null, or out of range you get an error that you have to catch – which adds time. Also the depth sorting is hideous as you must keep track of all the allocated depths precisely as you can’t assign arbitrary depths – which increases development time.

    Another issue I have is deleting an object. I’m now in the habit of thinking about how to delete a class instance as much as I consider how it is created – which I guess is good but it does increase development time. I wish there was a nice high level kill method that automatically destroys everything within a class instance – all listeners, references, and attached DisplaylList objects. I’m sure it would be very difficult to achieve but it would speed up development time.

    Finally, I find the flash documentation within the IDE very handy as a quick lookup guide, and I often have the IDE open just for it. It is now online and it is very slow to access and browse. I notice that the docs are also saved locally so I have now created a local shortcut to these docs instead. I cannot understand why adobe have done this. I think previously (flash 7 and below?) the help files would automatically update with any changes and in flash 8/9 you could always check the online help for feedback it something looks a bit fishy and it was a great system. Now it’s slow and wastes time.

    Robert Shearing

    29 Oct 08 at 4:00 pm

  54. I find AS3 takes longer than AS2, for me. Major bias, though… Factors:

    - I’m primarily a Flash, not a Flex, user. A lot of C# .NET, javascript and php background, however.

    - I breathe AS2. Still learning to sip AS3, which I have to learn in my spare time (most of my good $ clients still require Flash 6 -> Flash 8 content).

    - I code AS2 very OOP, externally linked, with minimal timeline code, already. I have developed reusable code for dealing with XML, event bubbling, multiple shared libraries and preloading, webservice connections (no default webservice support for AS3 in flash? ack), etc. So my AS3 ends up looking very much like my AS2 already looks, and the benefits I get from AS3 are relatively minimal still (I worry more about vector/bitmap animation performance more than code execution performance).

    So basically, AS2 or AS3 aren’t faster or slower, I’m just faster at one than the other, and am in a situation where I don’t benefit that much from AS3 yet. The main benefit to me might eventually be the Flex framework, but at the moment most of my work is so graphically crazy that I feel (perhaps incorrectly) much safer and quicker whipping up a small RIA in Flash+AS2 (or Flash+AS3) than trying to skin Flex (which feels less ‘Flex-ible’, still).

    I’m sure this will change with time, as I get more familiar (and/or perhaps once I get my head around the latest ways of skinning Flex with Flash), but there’s not much incentive for me at the moment. And most banner ads (the fast money!) still need to be done in Flash 6 where possible. ;)

    John Thomas

    29 Oct 08 at 4:34 pm

  55. hey,

    for me development in AS2 is much faster, cause i don’t know AS3 that good as AS2, but in my studies, i can see that development in AS3 is faster with each new day i’m using it. And the biggest thing is that AS3 have more potential, and there is a lot of thing which is more powerfull and easy to use.

    ifmi

    29 Oct 08 at 5:25 pm

  56. I wish i could just completely switch to AS3 – but then there is banners. I just recently had a banner campaign completetly recoded in AS2 just because some (bigtime) banner marketeer wasn’t able to handle flash 9 securitity policies (AllowScriptAccess = “always”/”sameDomain”) – that always kicks me back – but thats ok :-)

    Stefan Dosch

    29 Oct 08 at 5:42 pm

  57. What bugs me right now is not having an alternative way of removing every listener created in a class instance.

    A removeAllListeners() would be sooo nice!

    zambers

    29 Oct 08 at 6:34 pm

  58. [...] Product Manager for developer relations from Adobe, has been pinging the Flash community about whether AS2 based development is faster than AS3 for Flash projects. Having spent a long time in both languages, I thought I would post my 2 cents [...]

  59. My response was too long for a comment ;). Blogpost here: http://www.arpitonline.com/blog/?p=151

    arpit

    29 Oct 08 at 6:46 pm

  60. The issue of verboseness aside, AS3 development does in general require more development time, but the end result is almost always an application that is more robust and scales better. Percentage of time spend debugging is also larger in AS3 and I’m realizing the importance of things like unit testing which I never considered in my AS2 days when a simple trace was all you needed.

    Jim Bachalo

    29 Oct 08 at 7:06 pm

  61. AS3 is a wonderful language. Now that I am familiar with it!

    It still was also the most painful experience I have had with Flash.

    As a Designer, learning to code in Flash was a fun (circa ‘99 with Flash 4 and the pulldown interface). And I think the low ceiling is what brought a lot of other Designers to that application. As the technology has progressed though I’ve seen more and more Designer less desiring to keep up and more willing to hand off comps to more capable programmers.

    Is this a problem with AS3? Certainly not!
    Flash is capable of so much more than it is currently doing, so I am quite excited to see it evolve the way it has. The language, or rather application, just needs to grow in a way that enables more and more people to create with it.

    One part of it should be to enable people to create in a quicker prototyping environment and from the looks of things Thermo is well on its way to begin doing that.

    The other part is better informing those using the tool on how to better get up to speed as things evolve.

    ie
    The other day I was playing around with the new built in IK tools in Flash. It took me the better part of an afternoon to find out that I needed to assign runtime to the “highlighted” armature layer to enable code control over the ik tree. No where in the Adobe documentation was the ever mention of this. It just talked about the code calling to the tree. Fortunately I ended up watching a video by Lee Brimelow that actually showed the pulldown in his video.

    So this brings me back to the AS3 question.

    Definitely no!

    From the perspective of someone who was very reluctant to adapt to AS3, I now feel like it is a lot easier for me to build things BECAUSE AS3 taught me a better way to build things in the long run.

    I think the bigger question is how do you get more people up to speed and knowledgeable of some of the better practices like OOP.

    I think Lee and sites likes Lynda.com have become invaluable resources for people who are out of the scholastic environment and required to learn as they go. I just wish there was more available with regards to ActionScript, Coding practices, and staying informed as things evolve.

    Anyways… that’s just my thoughts this evening :)

    All the best to everyone who commented before me. I enjoyed the read.

    Erik Natzke
    -

    Erik Natzke

    29 Oct 08 at 7:31 pm

  62. Ok, here’s what I think:
    Sure, typing 3 lines to load an image takes longer than typing a single line. Then again, your whole project is not about loading a single image, is it? Because if it is, you shouldn’t even be arguing about the language, because you’re not even using it.
    The act of “typing”, per se, should NOT, under any circumstances take the most time of the development process. If it is taking the most time for you, you’re doing it wrong. You should think before you type.
    Personally, the advantages that AS3 have over AS2 would justify even if my code gets 1000 lines bigger, because I would definitely develop way faster using AS3 with 1000 extra LOC, than in AS2 with 1000 less LOC. Just to think of the number of ‘gotchas’ that we don’t have anymore makes me a happier person =)
    And lastly, if you complain about typing a lot, grab a copy of a decent IDE/Editor and create macros. That’s what they’re for!

    Wagner Amaral

    29 Oct 08 at 8:14 pm

  63. AS3 makes you waste some time at first but eventually you save on development. Adobe provides us with better classes such as JPGEncoder giving us tools that were simply missing before. Try to do something similar in AS2 and you’re in for some fun.

    AS3 also keeps my team in check, they seem to be less ‘draft’ writing in AS3 than AS2/1. It used to be a complete mess, AS3 enforces them to work in a slightly more standard way.

    Nicolas Noben

    29 Oct 08 at 8:31 pm

  64. i think many of flash peep come from designer and they didn’t familiar with OOP, also didn’t know anything about “.as” external class (forget about swc), that’s mean they need no more than 1-2 lines to make thing work (like getURL for sample), solution? just ignore ‘em! :P

    katopz

    29 Oct 08 at 9:06 pm

  65. I’ve been using OOP in Flash since AS1, so it’s not a paradigm issue. For me, continuing to work in AS2 is pure economics.

    My code base is a tightly honed system that looks very much like ActionScript 3 and MXML under the hood. I know that I can adapt to AS3, but I simply haven’t had the time (or the need). My system works just fine, no need to trade up until a client in$pire$ us to do it.

    My reason for staying with AS2? It’s faster due to our established systems and it’s more profitable because we are still recouping on initial time and sweat investments made in our proprietary code base.

    Making our inevitable move to AS3 means that I will have to budget more time to projects initially, pay employees to learn on my dime, reinvent some of our design, development and production processes, and hope the animators and designers can make the jump along with the developers.

    Not a big deal, we’re already in the process of making the change. It’s time.

    I think a bigger challenge for Adobe is getting designers to work in Flash as a design environment.
    The integration between Illustrator/Flash, Photoshop /Flash, and Flash timeline/AS3 is great. But those features are only useful if a designer understands the subtle nuances in working with all three programs, and how the assets they create are handled in an OOP/AS3 application.

    Designers and developers have been further distanced to some extent with the introduction of AS3 in my opinion.

    Great comments, glad to see we’re not the only AS2 stalwarts (thanks for the heads-up DP).

    Shawn Sheely
    Analog
    -

    Shawn Sheely

    29 Oct 08 at 9:55 pm

  66. I’ve basically always hated developing in Flash just a little bit. It felt buggy, poorly documented, confusing, and frustrating to work with. When AS3 came around, I adopted it before Flash CS3 came out and I’m never working in AS1/2 ever again. It just felt like AVM1 & AS1/2 was the product of some really poor engineering. I would quickly draw a parallel between Director’s Lingo and AS1/2. All that stuff was basically awful.

    Now, we have a really fast and really nice web virtual machine with high-powered graphics capability. The failure of the ECMA committee to pass ECMAscript standard 4 is the single most compelling reason for me to stick with using Flash over other ECMA-based virtual machines.

    So… thanks. ;)

    Caleb

    29 Oct 08 at 9:59 pm

  67. @arpit, in the link, points out something that bugs me in AS3 (actually a few things but I’ll simmer down)… the fact you can’t just addChildAt( any-old-layer-index-you-want). Maybe I just don’t know how but I have lots of use cases and no great solution. Here’s the case: I want to reserve slot in the display list in layer 100 for a dialog that gets created as needed. I can’t just make an empty clip or whatever in index 100 and hold that position unless all other indexes (0 through 99) are filled. Just a PITA… please someone tell me I’m simply doing it wrong.

    @Wagner Amaral you’re right that it’s silly to focus in on one specific case where you might have a few more lines of code. However, when you’re whipping up a quick prototype all that extra code really does bog you down. I’d still prefer to deal with this verbosity when doing quick jobs because it will make scaling easier if it ever needs to. But I just think you’re thinking long term or best practice etc… and I think some people never get to that point… or never want their prototype to.

    Phillip Kerman

    29 Oct 08 at 10:08 pm

  68. @ross
    Ummm…let’s clarify your “Somebody look at that code and tell me that it was faster to do in AS3.” by providing accurate code for AS2 and 3.

    AS3
    obj1.addEventLIstener(MouseEvent.CLICK,doPress); obj2.addEventListener(MouseEvent.CLICK,doPress); obj3.addEventLIstener(MouseEvent.CLICK,doPress);
    doPress(event:MouseEvent):void{}

    That is accurate. What is inaccurate is your AS2 (unless you’re writing timeline code).

    AS2
    obj1.onPress = Delegate.create(this, doPress);
    obj2.onPress = Delegate.create(this, doPress);
    obj3.onPress = Delegate.create(this, doPress);
    doPress():Void{}

    Now, in doPress(), how do you know what object was clicked? You create 3 functions.

    doPress1, doPress2, and doPress3 since Delegate can’t pass references. Or…you create your own Delegate, which I’ve seen before. :-)

    So, maybe you can get away with less keystrokes at times but that doesn’t equal easier in all cases. All-in-all AS2 is lacking terribly compared to AS3 specifically in mouse events, event management as a whole, and numerous other areas.

    Not starting a back-n-forth here but thought I’d clarify for you. :-) Take the time to learn AS3…it is worth it.

    John C. Bland II

    29 Oct 08 at 10:24 pm

  69. Is AS3 is better?…

    Hi all well I am not very sure about this for now as I have a year experience with AS3, however would like sketch some points over it pros and cons as per my observation.

    Number of lines code is much more then the existing coding for some basic featur…

    know SWF

    30 Oct 08 at 12:30 am

  70. ActionScript 3 for me is much faster. It is designed in the way we (tried to) work with AS2.

    On top of that Flex Builders code completion (CTRL + SPACE) and Eclipse word completion (default ALT + /, changed it to CTRL + ENTER) make that I almost don’t have to type anything.

    An example:

    (CS) = CTRL + SPACE
    (CE) = CTRL + ENTER
    (E) = ENTER
    (U) = UP ARROW
    (D) = DOWN ARROW

    pu(CE) var clip:Sp(CS)(D)(E);

    pu(CE) fu(CE) doSomething():Boo(CS)(E)
    {
    cl(CS)(E).add(CE)(U)(E)Ev(D)(D)(E), _addedToStageHandler);

    return true;
    }

    pri(CE) fu(CE) _a(CE)(e:Ev(CE):void
    {
    }

    results in:

    public var clip:Sprite;

    public function doSomething():Boolean
    {
    clip.addEventListener(Event.ADDED_TO_STAGE, _addedToStageHandler);

    return true;
    }

    private function _addedToStageHandler(e:Event):void
    {
    }

    Greetz Erik

    Erik

    30 Oct 08 at 12:50 am

  71. AS3+Flex+Eclipse/Flex Builder ftw :-)

    I’m with mr. Kepple; I think designers/non-oo-experienced scripters just have a hard time ‘getting’ OO, and thus not wanting to upgrade. I can understand this, it’s very different.

    bjorn

    30 Oct 08 at 1:31 am

  72. When writing AS3 I feel I have to be a lot more focussed on keeping things clean. When you forget to clean up an enterFrame listener for instance, it can crash your site. When you try to remove a movieclip that has already been removed, you get an error. When you try to use a variable that doesn’t exist yet, you get an error. So you have to write a lot more code that checks for possible errors. And in that way, it takes longer to write. In the end, the sites will perform better, but with most sites that’s not even that important. Most websites are only used for a few minutes, and are the closed again. They don’t have to be as stable as desktop apps. And I think the people at Adobe have focussed on that a bit too much with AS3.

    Youri

    30 Oct 08 at 3:51 am

  73. AS2 is faster for things like , load xml, getURL ….. but have _root, that sometimes make the code become a moster :P

    AS3 is faster for manage xml (after load), have more power, and you don’t waste the same time to upgrade your website or appllication that you will spend with AS2.

    With AS3 you spend more time to write the code, but you write a structured and good code, ease to understand and modify. (and don’t have the same errors that AS2 have :P)

    AS3 ever :D

  74. AS2 is faster in cases where i can gotoAndStop on the timeline and then access properites on instances on that new frame immediately. In AS3 i have to do a lot of workarounds, and I really miss that instant access.

    Peter Måseide

    30 Oct 08 at 5:10 am

  75. I agree with Youri entirely. AS2 development required a lot less worry, because AVM1 assumes that the programmer hasn’t got a clue, and handles all kinds of errors for you.

    I’m going to borrow two descriptors from the Perl crowd: manipulexity and whipituptitude. Accordingly, they represent a tool’s ability to enable its user to “slowly hand-craft a complex solution to a complex problem” and to “hack a solution to a moderately simple, but annoyingly tedious problem that occurs frequently”. (http://use.perl.org/~ziggy/journal/26131)

    The move from AS2 to AS3 was an increase in manipulexity and a decrease in whipituptitude. Moock has made the case that AS3 can be hacked together with the same vigor as AS2, but I’d like to see you try blazing through AS3 while worrying about weak vs. strong event listeners, (myMC_is_obviously_a_MovieClip as MovieClip).play() and run-time error #1009. (Yeah, YOU know the one.)

    That said, I think the problem is generally inflated by Flash programmers’ reliance on AS2’s whipituptitude. What’s nice about AS3 is, if you’re programming in classes, you will inevitably produce classes that you will be able to use again in other work. Your capabilities as a programmer will manifest themselves in your existing code library, not just in the work you produce. If I’m solving a problem similar to one I solved before, with AS3 I can just import and implement my previous solution, or subclass it. This is extremely rewarding and is a major advantage AS3 has over AS2.

    Rezmason

    30 Oct 08 at 6:34 am

  76. @John C Bland

    I am learning AS3, and, as I stated, am working towards coding exclusively with AS3.

    But, your statement that the AS2 that I wrote is “wrong” is inaccurate. The AS2 that I wrote in my comment is a very common trend in my coding, allowing me to use the same function for multiple objects. I don’t need to make 3 separate doPress functions. Let me flesh it out a little bit more for you, so you can see where I am coming from. Lets say I have 3 buttons, and an array of URL’s, each button needs to correspond to a URL:

    obj0.onPress = obj1.onPress = obj2.onPress = function(){

    var whichURL:Number = Number(this._name.split(”obj”)[1]);

    getURL(URLArray[whichURL]);

    }

    Ross

    30 Oct 08 at 6:46 am

  77. Addendum: hacking a solution together is a more emotionally rewarding experience in the short term.
    with(graphics){
    var f=drawCircle.apply, t=this, a;
    beginFill(0);
    a=[0,0,100], f(t,a);
    a=[-110,-125,65], f(t,a);
    a=[+110,-125,65], f(t,a);
    endFill();
    x=y=width;
    }

    Rezmason

    30 Oct 08 at 6:56 am

  78. Well its definitely faster. I guess the complexity of things we can create is better. That is why its faster. in AS2 we settled for simpler stuff.

    tambi

    30 Oct 08 at 7:19 am

  79. My feeling is that “programming an application” is faster in AS3 (overall knowledge of AS2 and AS3 being equal), but adding some basic interactivity to a website or widget is often faster in AS2.

    My main comment is that with AS1 and AS2 I was able to develop reasonably complex applications just by poking around, looking at some examples, and experimenting. With AS3 I’ve tried that, but I’m clearly going to have to sit down with a couple of books and/or attend some training seminars and do some serious learning before I can start developing anything. AS3 is for serious programmers (or designers and animators way brighter than I am.)

    I’m not saying that makes AS3 bad. I’m just saying it’s a totally different animal to AS2. Some kind of built in “get started” tutorial would be nice. Like they used to include for the drawing/animation tools.

    Robin

    30 Oct 08 at 7:33 am

  80. It all depends, for the most part as2 is faster, but when it comes to dealing with XML and just plain cleaniness AS3 far surpasses as2

    RyanP

    30 Oct 08 at 8:40 am

  81. Thanks Mike for opening up an interesting discussion.

    I’d suggest that much of the notion of speediness is largely an issue of perception and not something you can objectively measure. Each person is coming to the table with a different set of skills, experience and preferences.

    For those that have a more structured programming background most claim that AS3 is arguably a faster solution for larger projects. For those that grew their skills by following the evolution of ActionScript, there seems to be a consensus that AS2 lets them code more rapidly.

    Personally I can’t say which is faster for a project. Depending on what I’m doing I bounce between AS2 and AS3 depending on what I’m trying to accomplish. If I’m coding up a “rough sketch” of an idea I’ll use AS2 because I don’t have to be constrained by as many rules. I can write horrible spaghetti monkey code in AS2 and it runs fine (and yes I have a pet spaghetti monkey, he does my editing). I have no intention of ever reusing this code. Ever. It exists purely to prove that the concept is valid. Should I need to take the concept further, I start over. If I’m writing code that needs to be reused or edited by others, then I have to choose which version of AS I use, but either way it’s structured, commented and OO. Because of the fact that I approach the code in a similar fashion I can’t say that one version has a significant *time* advantage for me, but AS3 does force me to keep things clean.

    So, AS2 allows me write sloppy code quickly, which is useful in the same way that a quick pencil sketch is for roughing out a finished image. I can work out an idea rapidly with few constraints but in a format that isn’t consumable by the public. How I take that idea to the finished state is likely to be time consuming in either AS2 or AS3 and both are capable tools.

    Ric Ewing

    30 Oct 08 at 10:11 am

  82. Hi Mike,

    I arrived to Flash from a design background and not a programming background. AS1/AS2 just made a lot more sense when learning from scratch… ie I could make a simple button, add some simple getURL / gotoAndStop type function and things start to happen, without even needing to read a tutorial. Gradually over the past several years I’ve developed a good understanding of AS1/AS2 and can create some great sites for my clients (they aren’t interested in how it’s done, just as long as it works and looks great).

    The potential problem Adobe faces is if they neglect the fact that designers need to add interactivity and utilize what flash has to offer then another product will fill it’s place. I vaguely remember Macromedia removed the Script Assist feature in one of the versions and introduced some very limited panel for adding simple button actions (it was a disaster for me, I was unable to build anything in that version of Flash as the designer had been completely neglected – as such I didn’t buy a copy of Flash that year!).

    I really hope that Adobe can continue to develop AS2 alongside AS3 – let developers build RIA’s using AS3 that can interact with Air / Flex etc and let AS2 have the ability to hack away at things we need (such as the new 3D capabilities / better XML parsing etc).

    The simple fact is Flash has two audiences – Developer and Designer… there needs to be a safe zone where the two overlap so both parties can continue to use Flash as they wish.

    Stephen

    30 Oct 08 at 1:09 pm

  83. I’ve been programming in AS1, AS2 and now in AS3. AS3 is faster to develop with, but it requires an other way of programming, Object-Oriented.

    When you’re using AS2, top-down code… in the beginning it takes much longer to program in AS3. But after a while… AS3! (although top-down code is possible in AS3)

    Gerhard

    Gerhard

    30 Oct 08 at 1:34 pm

  84. I hate having to write dozens of event classes. I used to attach a lot of properties to events. I like not using Delegate though. It’s just… Declaring all these event properties in all these event classes…

    Sander

    30 Oct 08 at 4:13 pm

  85. A lot of good and interesting comments:

    Prototyping – the fastest way is on paper! Clean sketches, story boarding. Even from a design perspective I would prefer to see a scaled drawing than a photoshop render that I know would of taking x4 the time to do.

    AS2 – AS3: What I get from a lot of people is their dependency on solid structure to base their interactivity and functionality on. This is <= AS2. Where functionality was almost visual. For a lot of people the switch to thinking in functionality separate from the visual building is what is needed.

    I think Stephen above mentioned continued development of AS2? AS2 is broken, it was a growth from a multiple time lined application with code slapped on. Seriously as initially difficult as it is AS3 is the future. I wouldn’t shed a tear if I never looked at AS2 again!

    To allow designers to work better I wonder if pre package Constructor and Behavior design patterns need to be added. If these had a GUI via or visual access (much like the project panel) then that’s a start. Add in more components and a continuous open sourced classes for what people need (happening!).

    That’ll make those divingers/designers happy.

    Back to the OP questions:

    Do you think ActionScript 2 development is faster than ActionScript 3 development?

    Yes 100 fold. And for continous Development it only gets easier.

    If yes, do you know ActionScript 3 already?

    Yes. I have been using flash for nine years, AS3 for 9months and it is a dream. I am also a AS2 guru in my role at SWiSHzone.com so I have a lot of experience with others work in AS2 and how to knit large AS2 projects together.

    Can you give specific examples of things that you feel are faster / easier in ActionScript 2 (for example, playing a sound, or working with events)?

    The only thing is if you are not scripting and using the time lines to animate. Perhaps adding in a stop() here and there.

    Word up!

    Elliot Rock

    30 Oct 08 at 5:11 pm

  86. The zeitgeist in programming seems to be away from static typed languages and java seems to be falling out of favour. No-one here seems to mourning the fact the AS is getting more Java-like. Why is that? I would have expected a few Ruby/Python/Javascript fans to be irate about the direction AS has been going.

    (my own feeling is that AS should have fixed the silent type-casting and other weaknesses in it’s dynamism rather than going all our for static typing)

    Andy Baker

    30 Oct 08 at 6:36 pm

  87. I’ve found that AS2 is quicker now that I’ve been programming in AS3 for a while, but not quicker than AS3. Because of the event model, and learning cairngorm and many other things my code designs in AS2 are quicker to release, quicker to update and easier to debug. With that said, I am a programmer.

    My boss who has been programming since Flash 5’s tell target days finds the new ways annoying when he want to do the simplest things. Perhaps the Flash IDE could have an abstraction layer that converts designer friendly code to AS3 ( oh right, Thermo is coming :) )

    Daryl Ducharme

    31 Oct 08 at 10:25 am

  88. One thing I’m surprised to hear no one mention is memory management. Let’s be clear – personally and as a company we try and avoid AS2 at all times. AS3 is far superior. What’s hard to gauge is if things take longer because clients are a little more knowledgeable and we have to deal with more complex feature requirements as well as managing extra feature like ‘deeplinking’ with SWFAddress, SEO optimization with other little tricks, using MVC frameworks… However one thing I find we are spending a lot more time on is optimizing and checking for memory leaks. Removing listeners and object dependencies is just something we didn’t have to deal with much in AS2. In AS3 not handling this can result in apps that freeze your browser. i.e we never use mxml for any kind of itemRenders/cellRenders anymore, just adding the onCreationComplete event to these types of Classes in mxml can cause memory issues and that’s often a pretty important event. I’ve also found lots of respected 3rd party component vendors that are selling components with doggy memory profiling. We used to purchase the odd AS2 component but now, more often that not, we have to develop our own. this post has a bit more detail: http://www.darklump.co.uk/blog/?p=78

    To sum up, we just wouldn’t be able to do the projects we are now working on in AS2 but when I look back on the projects we’ve done since 2007 they have taken longer than they used to but they are more complex. Maybe we are also getting a little wiser as developers and taking more care over our standards too?

    paddy

    31 Oct 08 at 10:30 am

  89. AS3 is far faster and easier for me now that I had a chance to play with it for a year, I am not going back. The biggest advantage is that is debugging time is much reduced, in part because the structure enables lesser mistakes in the first place as well finding any mistakes is now a much more sane and consistent process.

    G. Bauer

    1 Nov 08 at 11:07 pm

  90. [...] been a lot of talk about AS3 being “hard”. A lot of it stems around the fact that its is more verbose than AS1 or AS2. [...]

  91. as3 has made it easier to share and adapt code and communicate with developers from other languages java, c#, c++ etc… surley not a bad thing as far as good progress is concerned. Its also made the flash community embrace some pretty important programming concepts and now i dont have to remember the depths of every single object that gets placed on stage :)

    corin

    2 Nov 08 at 12:56 pm

  92. @ G. Bauer – I agree that it is now easier to catch errors during the compile process. I just wish Adobe made the error messages a bit clearer, specific and easier to understand.

    Adrian Parr

    2 Nov 08 at 1:05 pm

  93. it seems that removing MovieClips (from the same SWF or external SWFs), is more complicated in AS3. No ‘best practice’ in sight yet.

    In as2, any designer can make simple clips with sounds, onEnterFrame, etc.. and removeMovieClip() will do the job (and seemingly clean properly). This allows a lot of flexibility, a expression.

    Flash player 10 unloadAndStop is a nice patch forward, but it would be convenient to use it on any DisplayObject. Also, adding implicit removeEventListener on blank keyFrame in Flash player 10 (http://www.bytearray.org/?p=378) shows that Adobe finally had a better understanding of the fundamental, recursive, model of Flash introduced in flash 3 with movieClips (hehe).

    A sarcastic, but tired-of-model-breaking-improvements, designer-developer.

    gludion

    2 Nov 08 at 2:04 pm

  94. I love AS3. Any project that doesn’t have a client requirement for AS2 will be done in AS3, no questions. I find it so much nicer to work with.