ReactionScript3

It seems like the Flash community have been reacting very strongly to a collection of articles on both the current state and future of ActionScript 3 this past week.
Pros & Cons
On the one hand we’ve got people arguing that AS3 development is more verbose than AS2 and therefore slower to code, there’s a complicated learning curve, and a plethora of ignorance from Adobe as far as acknowledging and fixing shortcomings and bugs with AS3. Meanwhile on the positive side, people have been defending how much better the object oriented approach to AS3 has enriched Flash development, especially with its similarities to JAVA development, and how much faster, lighter and more powerful AS3 is compared to AS2.
One thing seems clear – AS3 is here to stay whether it’s perfect or not, and AS2 will continue to fade away. So the sooner the switch is made to AS3, the better. But just how open will Adobe be to not only listening to the community’s feedback, but by addressing those concerns?
The Flash Community Have Spoken
Here are some arguments both for and against AS3 that are currently being aired in the Flash community that make interesting reading. Have a read and then let us know in the comments how you feel about the state of ActionScript 3 and how you think Adobe could make future improvements:
Making the Case for ActionScript by Peter Elst
Is a focus on how to do things ‘properly’ holding us back getting things done? I believe so. Is there anything now – excluding improvements to Flash Player performance – that could not have been done with ActionScript 1.0? Very little, though admittedly it now takes a lot less effort. Improving the language is one thing but it shouldn’t impede on what actually matters, the user. Innovation in the Flash Platform is primarily driven by creativity rather than the feature set of the tools you are given.
I would like to see Adobe focus primarily on the following core areas for the Flash Player: performance, multi-threading, hardware acceleration, compiler optimization. I think the current focus on object-oriented orthodoxy in the community and evolving the language is not necessarily the right approach. Moving further away from at least the option of dynamically typed languages and simple constructs, we now celebrate having something like
navigateToURL(new URLRequest("http://www.peterelst.com"));over
getURL("http://www.peterelst.com");
The Failure of AS3 by Nicolas Cannasse
(Author/Creator of the haXe multiplatform language.)
With the release of Flash CS3 Pro in April 2007, (and) now, more than two years later, it’s maybe time to check if AS3 was a success, or a failure. One of the (original) promises of AS3 was to get out of the whole “proprietary language” thing. Two years later, ActionScript3 is still a proprietary language, which evolution and control is entirely in the hands of Adobe. One of the areas where AS3 is definitely better than AS2 is speed: performances were greatly improved, and that’s a very good thing. However, in terms of usability, there was a lot of complaints of “old school” Flashers that had to write much more code in AS3 than in AS2 just to do exactly the same thing. I’m playing the devil advocate of course – but could someone explain me the advantage of writing the following in AS3:
mc.addEventListener(MouseEvent.CLICK,function(e:MouseEvent) { });Against the following equivalent in AS2 ?
mc.onClick = function() { }Oh, I can hear you : listeners are very powerful, you can add several of them on the same object ! Right… But how much probability do you have to need several click handlers on the same MovieClip ? Maybe one every hundred ? Or did you EVER need that ? I’m not paid for programming on a per-line-of-code salary, I want simple things to be simple to write as well. In terms of API design, IMHO AS3 went the wrong way : instead of making things that you write often be simple, the API gives you the power to make complex things, but simple things become very difficult and painful to write.
I personally think that especially in the programming language design area – where I’m the most active – AS3 is a failure : it brings too much strict OO principles to satisfy people that prefer “scripting” procedural languages such as AS1/2, but fail to deliver in expressiveness for people that want actual features in that area. AS3 is sick of the want-to-be-Java disease, and that’s not one that you can easily cure.
Sadly, I don’t think that AS3 can be fixed, or it might take years. Adobe has other priorities than listening to perfectionists developers, and they are masses of Flash customers out there that just don’t care at all, maybe because they do programming only as a job without any notion of pleasure inside it.
This is an outrage! by Joa Ebert
I have criticised Adobe in the past for a lot of reasons. Not because I do not like them or the technologies they produce but because I want to improve the Flash Platform. It seems like the future of the Flash Platform is defined in some conference room in some Adobe office.
There is always a way to make things better. I want to split them in three parts.
Contributing
Contributing to the SDK and to the Flash Player is a great option and I am thankful for having it. But this includes also contributing to the Flash Platform with tools.
- Extend the opensource Wiki for up-to-date specifications and allow people to contribute to them.
- Create an open ActionScript documentation.
- Do not develop something closed source to open it six months later like the TextLayoutFramework.
- Create a progress for code reviews and allow people to contribute without having to go through JIRA hell.
- Make a roadmap available so developers know what happens inside Adobe.
Language
To be honest no rational human being could say that ActionScript 3 (aka Flash) is superior to C# (aka Silverlight). Although love is not always rational of course. But in order to stay competitive here is my masterplan.
- Add support for generics.
- True method overloading.
- Threading support has to be implemented including synchronization features.
- Rethink the const keyword which is currently completly unusable.
- Implement standard OOP features like private constructors, abstract methods and classes.
- Create a collection framework making use of genercics.
- Create a robust concurrency framework.
Performance
Google’s V8 is getting faster and faster. Once JavaScript performance is better than ActionScript 3 it becomes ridiculous.
- Improve the VM performance especially for object allocation and method calls.
- A tracing JIT would be great, hotspot would be fantastic.
- Improve the performance of the compiler and its produced output.
I just hope someone at Adobe will read this post and understand how frustrating it is to develop such programs and to fix some stuff when not sitting right next to the product manager. Hopefully something changes.
AS3 Failure? by Andre Michelle
Every new Flash version extended my tool kit and I spent a lot of fun-time with the new toys. The only thing that annoyed me was that Actionscript was the slowest language thinkable. That all changed in 2005 with Actionscript 3.0, which I am very thankful for. Actionscript 3.0 came with some stunning new features like dealing with bytes on the lowest level, manipulating the display-list in runtime without destroying the DisplayObjects and the fastest language in the Flashplayer since then. And with Flash10, my dream of dynamic audio programming came true.
Actionscript is not solely a scripting language to extend your timeline compositing. Several projects are out there that rely entirely on Actionscript, including our little baby, the Hobnox AudioTool. We are doing exactly what Adobe were hoping for. We create a rich internet application (RIA), based on the Flash Player. That requires a lot of work and a lot of trust in the company that build the Flash Player and its language. So far we have a lot of problems to solve. I want to amplify every single issue/problem without repeating them.
Native Event System
The native Flashplayer event system is too complicated. Many people get lost in adding listeners to several events. This all leads to a unstable system, that is likely to throw some Null-Exceptions, when you forget something important that just pleases the system, the Flash Player provides.
Custom Mouse Cursor
Since Mouse.hide and Mouse.show provides hiding the system cursor, people think that it is possible to attach a DisplayObject at the same position, creating this way a custom system MouseCursor. Well this is not entirely true. The visual update rate of the Flash Player is different than the OS rate (updateAfterEvent doesn’t help), so they might often be an offset between the system mouse position and the DisplayObject position. It simply doesn’t feel very good, especially on lower FPS. Flash 10 provides a very tiny set of new cursors, which amount is not satisfying. If you want to create RIA, you need a solid set of cursors like Zoom, Resizing, Busy and even custom BitmapData for special cases.
Keyboard support
Dealing with keyboard events is hell, especially when trying to add control keys like CTRL and ALT. But this is very important in software, where you want to provide shortcuts for faster document editing. It reacts different on every OS, sometimes on different computes with the same OS.
Flash Player 11
All we know is that Adobe is focusing on mobile. I am personally not interested in mobile programming, since I like to have space for the user interface. However I see that there is a market for the Flash Player and time will tell if the Flash Player gets highly distributed on mobile devices.
However, has this stopped the big picture of Flash itself? A creative, media, runtime environment to create websites, games, applications, experiments and actually everything on any platform? I am afraid that resources at Adobe have moved to mobile development and nobody is thinking (about) or already developing for Flash Player 11. My biggest wish for FP11 is that it will be more reliable according to its language and existing features. Actionscript 3.0 is not a failure in my opinion, but it needs more enhancements to make it, what it supposed to be. A creative toolkit to compete with existing languages.
Adobe Are Listening
While the debate over AS3 ensues, it would appear that Adobe are more open than ever to hearing user’s feedback. A couple of weeks ago we reported that Lee Brimelow invited the Flash community to ask any questions you always wanted to know about Adobe and last week we noticed that another Adobe Platform Evangelist, Ted Patrick, requested comments and feedback about defining the future of Flash. So once all is said and done, and the community have made their voice known, it will be very interesting to see and hear what Adobe do to answer everyone’s comments, suggestions, and constructive feedback.
































I have yet to find anyone who doesn’t experience the following scenario:
When you fist start using AS3 you hate it, after you use it for a while you love it.
RT @joa: my final conclusion: we need a scripting language for the timeline, a programming language for applications. no mixture.

http://twitter.com/bit101/status/3226794967
…the API gives you the power to make complex things, but simple things become very difficult and painful to write
This is very true. There are several areas in AS3 which really needs to be simplified.
Anything is that remotely similar to Java is awesome.
AS2 was kluge-y and not as reliable and reusable as AS3.
“we need a scripting language for the timeline, a programming language for applications. no mixture.”
Yep, a flash player CLI implementation is definately needed; http://en.wikipedia.org/wiki/Common_Language_Infrastructure
Yes it may take an extra amount of characters to add listeners compared to AS2 but thats because its an event driven language, its consistent in comparison to the heap of s**t that AS2 was…
I agree that AS3 is perhaps more challenging to learn than previous versions, but if you want more power and flexibility in what you can do with Flash… then you have to expect that the interface between you and the technology is probably going to become more complicated.
From the articles above I find “This is an outrage! by Joa Ebert” the most relevant. Although most of the elements described there are not “outrageous” in my opinion, they’re simply “nice-to-have” things.
Personally, I think AS went the good way with AS3, getting closer to a rigorous and better structured language.
message.End(); //
…if you want more power and flexibility in what you can do with Flash… then you have to expect that the interface between you and the technology is probably going to become more complicated.
+1
I totally agree with CrackerJack.
It is a pain to write out more code, but the performance gains of an AS3 file over an AS2 means I can do things now that before crippled a browser.
I DO wish adobe would make flash CS4 run faster/ better, and while I’m wishing I wish they’d get flashplayer 11 on my iphone.
While I was confused at first, I quickly caught on, and now love AS3, and also the Flash IDE, which I believe AS3 has dramatically helped. The option to create all your visual assets in the Flash IDE and extend to class, that then extends a custom class. Not to mention the Open-Source community is booming with the release of AS3. The only thing that I can hope for is a half-way decent code editor coming to IDE, I personally think it holds a lot of people back from learning OOP in AS3, when especially at the beginning, you spend 70% of your time trying understand what classes to import.
switching to AS3 is worth it!
I was one of those old school AS2 coders myself, complaining about all the extra work AS3 imposes to any development, but then I decided to to tackle it going AS3 only with a new website I was about to develop in January, final result:
One project was all it took me to get comfortable with AS3, and the extra code writing time got compensated by the fact that debugging now is a breeze compared to AS2, and I even got to create some custom classes too.
I’m not so keen to use classes on regular basis though, as my field of work involves a lot of custom graphics and timeline animations and going that way usually tends to slow the development process, and I don’t get paid to spend my time doing perfect code, but to deliver good solutions in record time
Also, you can get even faster adopting a copy/paste strategy for recurrent lines of code form project to project, the “this takes a lot more lines of code in AS3″ argument just vanishes away
I 100% agree with crackerjack. It’s a little tough to learn, but SO much better.
Try teaching ActionScript 3. Procedural scripting is so easy to explain. The visual relationship is inherent. When you get into class construction and true object-oriented programming concepts, students just stare blankly.
Don’t get me wrong. I fully appreciate everything that AS3 is capable of. Thanks to Keith Peters, Peter Elst, and Todd Perkins, the ActionScript language has been shown to do some really extraordinary things. The inclusion of the Sound class and other things have really extended the possibilities.
I feel strongly that the Flash platform is getting a little splintered and Adobe needs to pull in the reigns and bring it back to the user. Make the tools easier to use and the language clearer.
I start to program Flash application by AS2, when I switch to AS3, I feel very uncomfortable and I thought AS3 is difficult to crate a simple thing. However, once I get used to it, it is the best and easy to use.
I think OOP (Object Orient Programming) is the way Flash must go. People who hate AS3 has to get used to it.
I also strongly agree that Adobe should really increase the flash player in performance, multi-threading, hardware acceleration and compiler optimization
I think part of the complaints arise out of the SUCK that is the code editor. It does not lend itself well to smoother / faster coding and in many ways has taken a step backwards from what the AS2 editor offered.
What is funny is that you don’t see too many people complaining about C# even though C# and AS3 have many similarities. I can only attribute this to 2 things:
1) suck code editor. The code editor should make coding easier / faster. Most “developers” have abandoned the Flash IDE and use either Flex builder or FDT.
2) scripters don’t want to transition into full OO. These dudes are mostly designers, don’t know / understand good architecture / framework or design patterns. I’ve said it before and I’ll say it again, keep AS3 but give the lightweights their scripting engine. Even if it is just syntaxual sugar. Let them “think” they are scripting but behind the scenes on compile make it legit or allow devs to toglle between pure and scripting mode.
-erik
@CrackerJack, I loved AS3 from the beginning, even though I’m still a newbie with it.
While I have accepted my love/hate relationship that I have with ActionScript 3.0, getting to that point took some time.
Like any new product, it takes a bit of tweaking before it can ever reach a more perfect state. Hopefully, those tweaks will be provided sooner rather than later.
I’ve was working with as2 for 4 years and I’ve loved then I’ve found that more and more clients where requesting for as3 apps, so I’ve decided to start my first apps using it, initially I’ve thought that it was so time wasting all the code needed to build things but them I’ve started to build more and more apps, where I was able to use same Packages I’ve built previously, it is true that you need to code a lot for simple things but you can build a simple package which handles what you want and use it everywhere (you’ll need to code less lines than on as2 directly). It is true that as3 has a lot of things to improve like their compiler, but for big apps it has a really improved performance than as2.
Yeah. I’ve just started learning AS3 for gamedev, and it makes life so much easier. It’s also faster. I can do things in AS3 that would cause major slowdown in AS2. Now, I feel like I can finally make those epic games that I’ve dreamed of (sans the art lol).
I agree with Eriak Bianchi from above. The code editor is the single biggest issue when trying to code at the same speed as you did in AS1/AS2. Flex Builder has got a few tricks up it’s sleeve to assist with that (auto code generation of getters/setters, constants and event listeners) so if the Flash IDE code editor was brought up to speed then a lot of what’s been raised in the initial article would be less relevant.
Personally my biggest wish for version 11 is threading support.
When I get CS4 and start learning AS3, you’ll get another erdict aswell
:D
Sorry, that was supposed to be “verdict”*, sorry :/
AS3 rocks! AS2 doesn’t stand a chance against the posibilities of the as3 engine. Faster, more intelligent and more intuitive. Give it a try if you haven’t already!
Is possible is a nonsense, but my hard critic to AS3 are the interface of the program, very clear, Windows do permission for personalize the colors of the Caption Bars, Background Windows Codes, etc…
Adobe put a interface that for my have a very little contrast and very much white or clear, I like contrast in the development environement, and is impossible to change, this is a stupid implementation, let the user take the decission of wath interface and colors like…!!!
Not impose a interface… Overalls my complaint is based in the stupidity of imposse a interface, nor are necessary, are a complication, much original the interface of adobe, ok, plas plas, but if I not like, why I need to work with your original interface???
Sorry for errors in my wirting, My english is Small…
Good day at all…
@crackerjack.
I find this with everything with many things I have had to learn.
eg. php or tableless layout
crackerjack ++ ;
Do not to forget the speed of as3 .