Flash is Not a Stepping Stone!

I’ve wanted to write this post for a while now, and since my meeting just got rescheduled, now is as good a time as any. The main gist of it is to try to dispel the myth that people who use the timeline in Flash and even use it to code are somehow not as advanced as people using Flex or other RIA technologies. Many Flash designers are buying into this and are starting to feel that they are lacking an important skill set in order to further their careers. This is true in some circumstances, but definitely not all. Let’s take a look at some of the reasons for this confusion.

RIA Terminology Misuse
Guess what? The vast majority of sites that show up on the FWA are not RIAs. So if you are targeting your career towards doing those kinds of experiences, don’t get caught up in the RIA hype. Rich Internet Applications, in my humble opinion, are things that look and behave more like desktop applications. This means that they make heavy use of component frameworks like Flex and they do so to the great benefit of their end users. Applications like Buzzword and Phoenix are pushing the envelope of what was traditionally thought possible in the browser, as well as on the desktop thanks to AIR. But these are applications and they should not be confused with the type of content that is put out by agencies like Big Spaceship and Red Interactive, where graphics, video, and animation take center stage. These are two different worlds, although there is of course some overlap.

Isn’t Everyone Using Flex?
Well that is kind of a loaded question. There is a big difference between using Flex Builder and using the Flex framework. Many top interactive agencies are using Flex Builder as their coding environment for Flash, but this should not be confused as them using the Flex framework. A lot of this unfortunately is the result of the lackluster coding environment inside of Flash, but I think I’ve talked that one to death. I also need to mention the other leading tools for AS3 development, which are currently FlashDevelop and FDT. Just so were clear here, the Flex framework is awesome for building RIAs, but it is not what you would want to use when building lightweight, animation and media-heavy Flash experiences. So don’t assume that learning Flex is something you will have to do in order to reach the top of your game.

Timeline Scripting is Not for Amateurs
This is one that is particularly troubling to me. While large OOP Flash projects that only use Flash for the library are impressive and are the right thing to do in many situations, it does not mean that if you code on the timeline you are in some way inferior. For high-end Flash experiences it is often absolutely necessary to use the timeline for some things. One thing that comes to mind is for animated buttons. While technically everything can be done in code, you would be a damn fool to write a mountain of code to do something that could be easily done on the timeline. Personally I like to have a library containing MovieClips that may or not have internal timeline animations and either attach them using ActionScript or lay them out on the main timeline. On the other hand, I am a big proponent of organizing your ActionScript on it’s own layer and in not ever attaching code directly to symbols. Luckily with AS3 this isn’t an issue anymore.

Many Things are Over-Architected
Over the years I’ve had the opportunity to look at quite a bit of ActionScript code from a wide variety of sources and I have seen quite a bit of this phenomenon. OOP has proven itself to be the best approach for serious software development but it is not always the smartest approach to every situation. Many developers love to be organized, sometimes to the point of being over-organized. In this fast, deadline-driven industry, it isn’t always possible to have every coding job be a masterpiece that utilizes the latest design patterns. Sometimes quick and nasty IDE coding is not only faster to write, but is also faster running and much smaller in file size. Definitely try to become the best programmer you can be, but don’t be ashamed of building something that runs great and makes your clients happy.

Ok now for some damage control. I love Flex and I think it is a great framework for building RIAs. OOP is a great skill to have and makes code organization and reuse possible. Thanks for listening :-) .

Lee


Commentary

  1. Simeon says:

    Hey Lee,

    I totally hear you man. I have always been a Flex guy. I sing the praises of the Flash platform, but I cant work in Flash to save my life. Lately I have been trying to dig into using AS3 to build flash applications without the mx core packages. And while this has been super challenging, I have learned so much! I think that I will benefit greatly from my more intimate knowledge of how the flex frameworks actually work.

    I just talked a bit about this today on my blog http://blog.simb.net/2008/02/14/flex-developers-are-so-spoiled/ And while I love being one of those spoiled developers, I really envy the skills of the traditional flash developer.

  2. Tim says:

    Very well said, Lee. I’m a “Flex guy” with some Flash experience and I don’t take offense to anything you said. In fact I agree wholeheartedly, especially with the last section.

  3. Thanks, Lee. I think you’ll find a lot of Flash developers who really appreciate this. Now maybe we can feel a little bit less guilty about sometimes using the drawing tools instead of the Drawing API. Etc., etc.

  4. fredo says:

    ‘Many Things are Over-Architected’ – like Flex for example ;)

  5. LEE says:

    the following manly man opinion class is open source, all may use it freely….

    package com.manly.man
    {

    import com.huge.package.Wisdom;

    public class OPINION
    {

    public var _opinion;

    public final function blogResponder(blogger:*):void
    {
    _opinion:String = articleConsumption(blogger.article);
    };

    private function articleConsumption(article:String):String
    {
    switch(Wisdom.compare(article))
    {
    case ‘sucks’ :
    return ‘I disagree good sir!’
    break;

    case ‘golden’ :
    return ‘Bravo bravo!!’
    break;

    default :
    return ‘no comment’;
    };
    };

    public function get manlyOpinion():String
    {
    return _opinion;
    };

    };
    };

  6. Jensa says:

    Amen!

    I had a weird experience at MAX 2006 where I saw a guy presenting this small Flash-app. He had done it in Flex, followed best practices, documented, used design patterns and the whole thing required 6 classes and lots of time.

    I just sat there and thought to myself – wow – what a great example of over-engineering! I would have done that in less than an hour using a single movieclip and the timeline, including talking to the backend using XML…

    I love Flex and use it as my primary code editor, but there’s a bunch of things that Flash does much better and without the overhead of the framework. There’s no code in my FLAs any more though. Just a document class and custom classes on movieclips that control stuff like those animated buttons.

    J

  7. corbanb says:

    WOW! That’s all I can say.

    Its good to see you say that coding EVERYTHING is not the perfect solution. Flash is capable as a player to do a lot more that just render code. Hence the timeline image at the top of this post. We have a timeline for a reason and it is ok to use it!

    Anyway I would like to applaud the post. This touches on a topic I will be discussing soon on rapid flash development. And how sometimes fast doesn’t mean cheap. Like you said there is nothing wrong with hitting deadlines and having happy clients. Oh and then you developers get to sleep some too!

  8. Alex Bustin says:

    You took the words right out of my mouth!

  9. chris says:

    thanks for writing that…you made my day!

  10. Paul Mayne says:

    In regards to the coding environment for Flash: I just can’t understand why Dreamweaver isn’t at least half as good at Actionscript development (for CS3) as Flash Develop, FTD, and a couple others I’ve seen.

    It’s Adobe’s own code editing tool, it costs big $$ and it’s not set up to do code hinting with custom classes and able to publish to Flash CS3? Weird.

  11. Josh Tynjala says:

    Good points. You’re absolutely right. As a developer who develops with many Flash technologies, I am not afraid to say that I churn out a little timeline code down from time to time, and I write full OOP architectures using the Flex framework too. Use the right tool for the job, and remember that Flex framework is not always that tool, and neither is pure AS3 without a framework. I’ll be happy to see people who are confused now start to realize that Flex will not replace traditional Flash once Flash CS4 comes out. With the features previewed at MAX 2007 alone, I hope the evidence should be clear enough to clear up this sort of confusion.

    Lee, one of the big reasons why you needed to write on this subject, I think, is that the meaning of the terms “Flash” and “Flex” are used too broadly in people’s daily conversations. Sometimes people say “Flex” when they only mean “Flex Builder” (the most common, I’ve noticed). Sometimes they mean “the Flex framework”. Sometimes they mean both. It’s the same with “Flash”. It can mean the whole “Flash Platform”, the “Flash authoring environment” (sometimes called the “Flash IDE”, for those keeping score), and even “Flash Player”. Usually, a person’s meaning can be scraped from context, but I’ve seen a ton of confusion with terminology.

  12. Nolan says:

    Very well said, Lee. Agreed.

  13. MikeTheVike says:

    good article. I just started teaching myself Flash and AS3 a few months ago. I’ve been trying to absorb as much information as I can, reading flash blogs, websites, forums, etc. I noticed people talking about Flex and Air and I was like oh great, I’m another step behind.

    I agree about the timeline, I’ve been working on a project for the last couple of weeks, and I have most of project coded, but on some things like rollovers and other animations, its just faster to use the timeline.

  14. I like the ideas that are being shared, but I would like to leverage a little reality check here. I personally came to do actionscript from having a pro career writing code in languages like VB, Java and C#, and those design patterns and object oriented development rules and techniques are invaluable. As a full time pro actionscript developer today for an eLearning company, I can say the following about OOP and timeline development:

    1. Just because you put code in an external class doesn’t mean that it is object oriented nor do you get the benefits of OOP (like true reusability, as compared to canabalizable code.) Writing “off the timeline” doesn’t auto-magically mean “better!” I have seen plenty of “class”-based actionscript that made me want to change careers so I didn’t have to keep working with code from someone else like that.

    2. I can almost never think of a good reason to not write something in an object oriented manner (emphasis on manner, because sometimes, at least in ActionScript 2, if you want to do something specific you don’t have a way to do it in a strictly object oriented manner.) I think, wait, I know I am doing a favor for myself and all of my co-developers if I follow those rules and “methods” for coding. When it comes time to go back to the code in a project a few months later, the code is far more understandable and approachable, because we are all using a common standard for how to encapulate, operate and extend our functionality. So, if someone is celebrating the timeline right now, please, do us all a favor and at least start to commit to learning OOP so that you CAN use it when you SHOULD. If I ever have to work with you, I know I will use your name far less as a swear-word when reviewing some “code” you wrote.

    I do use the timeline in flash (I sometimes have to write a SWF that someone else loads, targeting player 8 and using AS2) and while that code is not Object Oriented, I still write “accessor” public-styled “properties” and “functions” (properties like getSomeVariable(“some value”) and setSomeVariable(“SomeValue”) and functions like loadData(someArrayOrObjectOrClass) code) so people (like, at the least, me later on) loading my SWF still get the benefits of a thought-out interface.

    All of this to say, whether in the timeline or outside of it, I don’t see a reason for “doing” actionscript these days and not committing oneself to learning OOP.

  15. Nik says:

    Well put! As a bit of a design/programming hybrid, I frequently find myself questioning what the best solution is.

    It’s always a compromise: Yeah, it could be done entirely in code. And, yeah, it would probably be a smaller file. But what about updating things a few months later. Or, more importantly, someone else updating things…

    Nice article, Lee.

    Nik

  16. Jonah says:

    Well said Lee! I found myself believing the OOP strictly/ all programming for Flash motto that seems to have really taken off as of late. Although I will continue to strengthen my programming techniques and skills as an Art Director turned Flash Developer, it’s re-assuring to hear from a guy like yourself that you think sometimes things are just ridiculous to strictly program vs. using the timeline. Cheers!

  17. Aubrey says:

    Lee. I have to say, well put. Flash is a wonderfully flexible application that caters to both designers and programmers (and even those of us who do both, but probably wouldn’t if it wasn’t for flash ^_^). Why should the people who use flash deny half the application? Silliness I tell you.

    I just wrote my first Class this last month and I can say with out a doubt that your selfless and relevant efforts on gotoAndLearn.com and here are in no small part responsible for my continued interested in Flash and ActionScript.

    Thanks for supporting us up-and-comers for all these years.

    Keep it up!

    Aubbz.

  18. e1 says:

    well spoken. Agreed.

  19. Eduardo says:

    Is it possible to mix the 2 development approaches (timeline code and external OOP code)?

    For example, let’s say I’m using FlashDevelop with the Flex SDK compiler to build the main SWF, but all assets are embedded from a SWF compiled with Flash CS3, like this:

    [Embed(source="assets.swf", symbol="arrow")]
    public static const ARROW:Class;

    As far as I remember, timeline code can’t be executed when the MovieClip is embedded from a SWF (e.g. any code in the “arrow” timeline is simply ignored) ?

  20. Kriz says:

    That’s one of the best things I heard in a long time.

    The flash IDE has become my primary sketchpad for every project. I couldn’t get my head around the fact that I still do most of my drawing and animation on the timeline, instead programming it all. I think al lot of that has to do with the scale of the project.
    I’m using the flash IDE for about 7 year now, and on most projects I’m both the designer and the programmer, and I try to combine the best of both sides from flash. If coding something on the timeline saves me a lot of time, I’ll do it, and I think people don’t have to be ashamed of doing so.

  21. Cool article.

    I am a designer/coding hybrid and I know that the timeline in flash comes with great power. I really think the flex people could learn a lot from that instead of coding everything. It’s actually possible to make very complex animations in a few minutes that would take hours to code. Lee I really agree with you on that one!

    I try to operate with two rules when doing my flash projects:

    1. If the project is well specified and I’m sure that I will never work with it again then I go for the quick and dirty approach and do things in the timeline. It saves time in most cases and my clients can’t see the difference anyway. This mainly goes for banners, small campaign sites and stuff like that.

    2. If the project is not well specified from the beginning or there is a slight chance that I will need to make changes during the project phase or in the future then the “over” engineered approach might not be that over engineered after all. I hate myself for being lazy when “simple” changes 5 month later is not that simple at all and I can’t remember the quick and dirty tricks I’ve made.

    If you get used to doing things right and use design patterns then it will just be part of your coding toolbox and you will actually not think about it as being to much work at all. I think most web designers knows that it’s not very nice to open a photoshop file with 600 layers where everything is a mess and nothing is structured. If you think of your flash projects the same way it might make sense.

    ————-

    To sum it all up I think the great power of flash comes when you know when to combine the two statements above. You will not miss your project deadline and you will not get confused by changes 5 month later.

    ————-

    By the way, I started using FDT a few month ago and is now doing lazy coding because of the many great features. I still love the Flash IDE and is still using the drawing tools and the timeline. For me the Flash IDE and FDT is the perfect setup.

  22. Jacob says:

    Congrats. In this short post you’ve enclosed simple perfection of what’s going on with Flash technology lately.

    RIA’a are great, but they’re hard to build cause time’s running, and deadlines are coming.

    In fact client’s, for most of the time, are interested in enjoying website, and like to play with it, that to know that their query was processed two times quicker than when build in Flash.

    Of course it’s relevant for a person involved in evolution of this technology to know both ( Flash and Flex ) in order to achieve more flexibility and gain knowledge :) .

    So what you wrote takes a huge load off my chest, cause now i know there’s someone with mutual opinions.

  23. Nate says:

    GREAT POST!!! I started off a designer, and after having my head in the books for some years, I’m now almost at the opposite extreme. I love Flash, but definitely find myself overly thinking things and spending far too much time brainstorming on the architecture. There are lots of times where I need to get things done quickly rather than find the most efficient way of doing it. Thanks for the slap in the face:P

    Nate

  24. asfox(nee) says:

    nice!
    i just use fex and flash to develop the projects.
    fex for code
    flash for art

    that’all

  25. Tink says:

    “The main gist of it is to try to dispel the myth that people who use the timeline in Flash and even use it to code are somehow not as advanced as people using Flex or other RIA technologies.”

    “Guess what? The vast majority of sites that show up on the FWA are not RIAs. ”

    I’d agree with both these and IMO FWA is seriously lacking in the Flex/RIA department. That said I say the vast majority of sites that show up on FWA are not coded on the timeline, and the projects are split up in multiple roles.

    Most are done by large agencies and will be developed using external classes by that agencies development team. That’s not to say there’s no timeline stuff in them, but this comes down to roles in the project.

    Designers get the look and feel together and animate stuff on the timeline (maybe even add bits of code to show the dev what they want).

    Developers then get all these assets, build a site architecture and work these assets into them, controlling everything in AS (enabling localization, subversion, multiple devs, ability to rewind rollOvers seamlessly from any state etc). When they do this they are most likely to rip any code out of the timeline and recode it.

    So back to the original point. I agree Flash is not stepping stone, it is imperative for a particular role in a project, in the same way that external editors are imperative. That said if you want to be a FT Flash developer, you should be aware that the Flash IDE isn’t the best place for you.

  26. Lee,

    Thank you for saying this from the very source of the industry. Fl programmers have become snobs and have tried to over compensate to rid themselves of the “web designer” tag by over complicating Flash ten fold. As a producer I find it frustrating when my developers tell me something cant be done or will take longer simply because God-Forbid they should ever touch the timeline or use pre-programmed classes for something quick like a rollover or button. Its all based on insecurity, its time it stops!

    Trust me I know when im called a “web master” i want to go on a killing rage but i realize that people are just still too ignorant to understand how far this industry has come.

    Timeline is fine!

    And fast!! especially when you have a deadline of yesterday and the client just wants to see something move!

    Good piece! MORE!! MORE!!

  27. Jonah says:

    There are some good points in the comments. As a caveat to the people maintaining the ‘OOP always better’ stance I say this, it all depends on the industry you’re working in. If you are working in a place that develops full-out apps with real plans to maintain and update, then yes it’s necessary to have the cleanest code for future extensibility for yourself and other programmers. BUT, if you for instance, like myself, work in advertising or similar it’s often times unrealistic and unnecessary to code strictly in OOP.

    Here are some of my reasons (as far as advertising):

    1. Project timelines are often too fast-paced to sit down and properly structure code in all class-driven structures.
    2. Chances are you will be working and passing files to people that have no idea how to work in OOP.
    3. With a life-span of the typical web project lasting maybe two-to-three months it’s somewhat a waste of time to be extremely particular about code structuring.
    4. Over-thinking something that could be easily done in conjunction with timeline/ coding wastes valuable time.
    5. Why ignore the benefits of using the Flash IDE when it can be really helpful at times to use everything in it?

    So I’ll say it again, it all just matters on what industry you’re in and how your work influences your solutions. Just my .02 cents. Cheers

  28. inEar says:

    I’m glad this is brought up to the surface. Personally, I can sometimes be a little stressed about all new technologies and programming techniques with OOP and the advance of the actionscript language. It’s a great development and learning is fun! But I want to now my qualities/limitations and feel that i’m on top of things. Then the Flex world is there, haunting you with bad conscience about not beeing a good OOP-programmer/developer.

    Just created a new flash development blog and brought this up there, so I’m glad to hear same thought from a pro like you!

    http://devblog.projector.se/?p=6
    http://devblog.projector.se/?p=5

  29. Danro says:

    Hey Lee, great post!!

    As another hybrid designer/dev from way back, I agree that the timeline is still just as important as the code. Without it, we would be nothing more than application developers. Though the only code I place in my FLAs is either a stop function or a callback, I still use the Flash environment for animation and visual layout of assets such as fonts and components.

    For example, every time I create a textfield using pure AS- I am reminded (20 lines later) that some things require a visual editor to remain efficient. That said, I look forward to the new improvements in the next IDE.. and hopefully some more love for us Mac users :]

  30. I really think we are all talking about a few different things:

    1. We don’t always need to implement OOP: I think we all agree this is true, and the key is to do it when we are able and it makes sense (that is subjective and I could be a case for how I do this.)

    2. Timeline code / animation is not evil: I think most of us would agree this is true. There are places we sometimes need to put a “stop()” or other timeline based code that makes sense.

    But I think there are other myths that need to be broken here:

    1. “If I don’t have time to build a class, then I get it done on the timeline”: The problem here is that we never have time. Better said, the problem is that we don’t …make… the time to learn OOP and so we simply never “choose” a tool that we do not have. Having a quick project and deadline are never a good reason to not write OOP. They are just excuses.

    2. “Writing code in OOP is overkill”: Generalizations like this are indicative of a general misunderstanding of how OOP works. If you consider that the greatest advantage of OOP is how you organize your logic so that it can grow, there isn’t much of a reason to say “organization is overkill.” The fact is that thinking about OOP doesn’t create a need to think about stuff you otherwize wouldn’t have to, as much as it forces you to consider stuff you would have otherwise forgotten to think about.

    3. “I’m never going to touch this again, so I will get it done on the timeline rather than write OOP”: This has got to be the biggest issue/headache I have bumped into in my career. And we have all done this, so I am not pointing any fingers, BUT… the Murphy’s Law of Programming says that the long-term projects never get built and the short term solutions live forever. If you write it and it is worth the money someone paid for it, then they will at some point, come back and want a change to it. If it isn’t worth much, then sure, it will be disposable, but nobody wants to claim that sort of code (and the truth is that much of the “source” we might turn over will get consumed by someone else, let alone ourselves, in the future.) So again, I think this is an excuse.

    A good example of all of this at play was a set of learning games I participated in writing with some folks about two months ago. We had about a dozen games. My employer decided he wanted to host the games online and connect them with a database and let people login to play the games and save their scores. None of the games did that, nor was I a database developer. So I wrote a class that the other designers could load in at the start of the game, that would programmatically create a login form and pause the game until they were able to successfully login (one line of code for the designers to implement.) Then later, one line of code to save their score (I worked with a DB and server-side developer to get the DB interaction working.) That worked great, and then another month later and they wanted some changes both in the games and in the login. My game, though I had no disposition to “extend it” in the future, was easy to update because both it and the login code were in a class. I was able to open the FLA and simple recompile it. Any of the other games that required changes that were not in OOP classes, had to endure more convoluted workflows for updating.

  31. Very well said, I agree 100%.

  32. Curran says:

    “Let me start with a news flash for all you developers out there. The Timeline is not your enemy. The Timeline is your friend. The Timeline is your ally. Use the Timeline.”

    Jamie Kosoy Senior Developer, Big Spaceship has an interesting and relevant article concerning one of these topics of debate

    http://www.adobe.com/devnet/actionscript/articles/lightweight_as3_02.html

  33. tim says:

    Well, duh. Common sense.

  34. VeryVito says:

    Sounds like common sense, true, but… it’s not so common. I’m surprised by how many hiring managers are asking for “multimedia designers” with a firm understanding of Flex application framework design, or “application developers” who can create the next great animated Web cartoon.

    There are some of us who fortunately can work in both worlds, but the two are quite different, and it’s always good to hear someone recognize that both qualify as “serious professions.”

  35. mrock says:

    word to this blog.

  36. nicemandan says:

    Personally I think this is more a discussion about the grey area between Flash Designer and Developer. As a Flash Developer, I personally stick everything in classes and try and use the best OOP practices my head can come up with.

    However, I also work with animators and designers who do everything on the timeline, but that’s not a problem. So long as it’s all in a MovieClip, I can manipulate it how I want, from the classes I write.

  37. gingerman says:

    I am from a design/art direction background, but after much hard work & experience am a quite good coder ( when I have the time to be ).

    I was taught at college – never let the technology get in the way of creativity. I guess you could apply this here.

    I use alot of technology in my work, but at the end of the day if it is used gratuitously the creative may suffer.

    Nice article – that’s how I code ( horses for courses )

  38. Rich says:

    Well said!

  39. It’s like any technology, there are so many excellent technologies out there and all of them do wonderful things and have their own best fits, but any language in the hand of a crappy coder will product a crappy product.

  40. Saravanan says:

    Hi,

    But any extensions from adobe and code samples for using the extension are available for flex only … making flash developers like me to forced to use flex… even i know flex i cannot use the facilities of the extensions with Flash+Air.

    If the things available in common for example merapi, commandproxy..and some new releases on adobe labs targetting flex and flex users…

    -sara
    http://www.designscripting.com/

  41. HelenLee says:

    Wonderful! I am just in a spot where I am trying to stick to all kinds of “best practices” for programming, structuring code, OO and whatnot, but often wondering why we spend hours on a small animation (or big) that I would do in 10 minutes straight in flash and put in a reusable moviclip… and it would look so much more alive probably…
    But the most important thing is that for me since Futuresplash, coming from animationwork, it was like getting a magic wand. Most of all it was fun! Creative! Now… animating with code, yes I know all the advantages but it is … boring.To sit handson and get timing right with the actual visuals on stage is just something else then punching numbers.
    I can do both and will use just the best (and most interesting!) way-tool for the projects. With no shame whatsoever! (but no bloats)

  1. [... I’ve wanted to write this post for a while now, and since my meeting just got rescheduled, now is as good a time as any. The main gist of it ...]

  2. [... I’ve wanted to write this post for a while now, and since my meeting just got rescheduled, now is as good a time as any. The main gist of it ...]

  3. [... I’ve wanted to write this post for a while now, and since my meeting just got rescheduled, now is as good a time as any. The main gist of it ...]

  4. [... I’ve wanted to write this post for a while now, and since my meeting just got rescheduled, now is as good a time as any. The main gist of it ...]

  5. [... I’ve wanted to write this post for a while now, and since my meeting just got rescheduled, now is as good a time as any. The main gist of it ...]

Leave a Comment