22 Replies Latest reply on Mar 26, 2008 5:20 PM by Newsgroup_User

    why is AS1 documentation not a part of CS3 help

    dsdsdsdsd Level 1
      hello;

      in my flash CS3 help, there is AS2 and AS3 documentation, but no AS1 documentation;

      I have come to the understanding that AS1 would continue to be supported in future flash authoring environments;

      any thoughts?

      thanks
      dsdsdsdsd
        • 1. Re: why is AS1 documentation not a part of CS3 help
          Damon Edwards Level 3
          Why document a programming language that is old and deprecated? There have been two versions since, so no, I wouldn't expect there to be any documentation on it. Yes, its still supported though via publish settings.
          • 2. Re: why is AS1 documentation not a part of CS3 help
            Rothrock Level 5
            Really it is. AS1 and AS2 are the same set of methods, properties, and events (for the most part). The real difference between AS1 and AS2 is how you put them together.

            So pretty much anything you need for AS1 should be in the AS2 help files.

            What are you trying to find that isn't there?
            • 3. Re: why is AS1 documentation not a part of CS3 help
              dsdsdsdsd Level 1
              I am not so sure about the notion of abandoning AS1;

              I have built class-based apps with AS1 for about 4 years, of course I was creating the classes myself;

              AS3 seems to satisfy computer-scientists programmers who have hard-core coding experience with Java and the C's;

              I would guess that of all flash-users/developers, only a very small percentage fall into the computer-scientist family;

              AS3 does not seem to lend itself to the simple flash developer, who approaches an app development procedurally;

              I am discovering one of the biggest learning curves that I have dealt with with AS3, as far as programming goes, other than maybe Lightwave's LScript - but only because of lack of documentation and community support;

              I believe that if AS3 is proving 'so' difficult for me, then I would imagine that a large percentage of the overall flash-user family will also have a very difficult time;

              so I am crossing my fingers that AS1 is not abandoned, not only for myself, but for the common AS beginner, who is usually a creative person first and foremost, and a programmer only to support their exciting ideas - AS3 will stump that creativity I think;

              dsdsdsdsd

              • 4. Re: why is AS1 documentation not a part of CS3 help
                Rothrock Level 5
                Actually if you have built class-based apps, then you have been building AS2. That is the difference between AS1 and AS2. There really is almost no difference between AS1 and AS2 other than how they relate to creating classes. So really CS3 still supports AS1 and 2. And much of what people call AS2 is really AS1. I guess I would say that there really isn't much point in worry about AS1 as a distinct thing from AS2.

                That being said, there are some old techniques that I think of as AS1 and should be abandoned. Most notable is using on(event) to put code directly on objects. Here is a good article about that:

                http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent

                Starting with Flash MX (6) that technique was no longer a good idea. And you can still use them in CS3 if you publish to AS2. Flash MX came out in early 2002 -- so that is 3 versions and 6 years ago. Additionally you can still publish back to Flash 1 if you desire. So what I'm trying to say is the speed with which things have been depriciated and/or removed has hardly been quick. Of course now with Adobe taking over it might all change...

                As for the last part of your post, "...who is usually a creative person first and foremost, and a programmer only to support their exciting ideas..." that is a bit trickier. I'm a bit of both -- designer and programmer -- but it always really annoys me when people who have no skill or training in programming think that it should be easy to produce complex interactions and compelling experiences with code. Programming is hard difficult work. Just owning Flash doesn't make one a programmer.

                Turn it around.

                I need to learn all kinds of stuff about line, color, contrast, balance, fonts, perception, etc. To design sucessfully I need to think about mood, experience, and so on. Again it is hard work and requires constant development and learning. Just because I have photoshop I am not a designer.

                The basics of gotoAndStop() are easily learned by any designer who cares to learn it -- whether AS2 or AS3. If something more complex is required then perhaps it is time to bring in a professional!
                • 5. Re: why is AS1 documentation not a part of CS3 help
                  dsdsdsdsd Level 1
                  Rothrock, I would not agree that this is bad:
                  quote:

                  when people who have no skill or training in programming think that it should be easy to produce complex interactions and compelling experiences with code


                  I am in Chicago, where we have thousands of flash developers, and only a very small handful are programmers at heart;

                  however, because of the ease of procedural AS1, they can "produce complex interactions and compelling experiences with ( simple, procedural AS1 ) code";




                  however, I also believe that it is necessary that the coding interface be competant enough to handle much more complex architectures, which AS1 can;

                  so to me AS1 is the best of both worlds, whereas, presently, I do not consider AS3 to be creative-friendly;

                  by the way I should mention that when I say 'class' I mean:
                  • 6. Re: why is AS1 documentation not a part of CS3 help
                    Level 7
                    dsdsdsdsd,

                    > however, I also believe that it is necessary that the coding
                    > interface be competant enough to handle much more complex
                    > architectures, which AS1 can;

                    Sure. Ultimately, you should do whatever makes you the most
                    comfortable -- whatever helps you get more done in the least amount of time.
                    If that means sticking with AS1, then so be it. :) Personally, I feel that
                    AS2 is more conducive to writing classes than AS1 (especially given AS2's
                    class-related keywords), but here's the eye-opener: under the hood, AS2 and
                    AS1 compile to the same bytecode. In a sense, they're the same language.

                    As Rothrock mentioned earlier, the APIs are virtually identical, aside
                    from class-specific keywords like class, extends, implements, public,
                    private, etc. If you prefer to write classes in the way described here ...

                    http://www.debreuil.com/docs/

                    ... then the AS2 Language Reference really does have the AS1 Language
                    Reference built-in -- as long as you avoid the specifically class-related
                    APIs. For example, pick an object, any object ... I'm flipping through
                    randomly ... the Color class. I'm in the AS2 Language Reference, mind you,
                    but I'm looking at the Color class entry and see in the Availability heading
                    that this class is available to AS1, Flash Player 5 or higher. The Date
                    class ... available to AS1, Flash Player 5 or higher. MovieClipLoader class
                    ... available to AS1, Flash Player 7 or higher. SharedObject class ...
                    available to AS1, Flash Player 6 or higher.

                    What's the difference? In AS1, you don't strongly type your variables
                    or function return values. Meaning, when you declare a numeric variable ...

                    var myNum:Number = 5;

                    ... you leave off the :Number for AS1:

                    var myNum = 5;

                    That's it. Seriously. (That and avoiding class, extends, implements,
                    etc. But that goes without saying. Strong typing is optional, in any
                    case.)

                    > so to me AS1 is the best of both worlds, whereas, presently, I
                    > do not consider AS3 to be creative-friendly;

                    Have you read this? It may give you some encouragement:

                    http://www.insideria.com/2008/01/actionscript-30-is-it-hard-or.html

                    > by the way I should mention that when I say 'class' I mean:
                    >
                    >
                    > //-----------------------------------------------------------
                    > my_class = function( arg )
                    > { this.ps = arg ;
                    > trace( this.ps ) ;
                    > }
                    >
                    > var my_instance = new my_class( "howdy" ) ;
                    > trace( my_instance.ps ) ;
                    > //-----------------------------------------------------------

                    Right. Nothing wrong with that. This will allow you to write
                    ActionScript compatible with Flash Player 5. If that's your target
                    audience, have at it. If you can publish for Flash Player 6, you can use
                    the AS2 class-related keywords, which give you more intuitive control over
                    the same *concepts* you're already using. Same thing, you just don't have
                    to jump through as many hoops (consider Object.prototype, __proto__, etc.
                    versus extends, implements, etc.).

                    Anyway, the long and short of it is, the ActionScript 2.0 Language
                    Reference *is* the ActionScript 1.0 Language Reference ... it's just an
                    updated version of the documentation. It's the AS1 Language Reference Plus,
                    and the Availability heading listed in every entry tells you the earliest
                    version of Flash Player to support that keyword, and if that keyword
                    requires AS2.


                    David Stiller
                    Co-author, Foundation Flash CS3 for Designers
                    http://tinyurl.com/2k29mj
                    "Luck is the residue of good design."


                    • 7. Re: why is AS1 documentation not a part of CS3 help
                      dsdsdsdsd Level 1
                      David Stiller,
                      excellent article, definately right on point with my concerns;

                      I suppose that maybe the way AS3 is presented may be part of the problem;

                      for instance, I have the AS3 Cookbook and it starts right from the beginning with packages;

                      likewise, 99% of all the online tutorials do as well;

                      and the CS3 documentation is written very Java-like, as opposed to common scripting language references;

                      dsdsdsdsd
                      • 8. Re: why is AS1 documentation not a part of CS3 help
                        make125 Level 1
                        David Stiller, thanx for your post. exactly what iam looking for



                        ------------------------------------------------------------------------------------------ ------------
                        stadt-branchen.de
                        • 9. Re: why is AS1 documentation not a part of CS3 help
                          Level 7
                          make125,

                          > David Stiller, thanx for your post. exactly what iam looking
                          > for

                          Glad to help. :)


                          David Stiller
                          Adobe Community Expert
                          Dev blog, http://www.quip.net/blog/
                          "Luck is the residue of good design."


                          • 10. Re: why is AS1 documentation not a part of CS3 help
                            Level 7
                            dsdsdsdsd,

                            > I suppose that maybe the way AS3 is presented may be part
                            > of the problem;

                            I haven't purchased tons of AS3 books, but I do try to keep up, and I
                            think you're right ... many (possibly most?) books on the market at this
                            time tend to be aimed at class-based programming. There's nothing wrong
                            with that, of course; it's just that such books are aimed at an audience
                            drawn to that paradigm. To my thinking, there's still plenty of room for
                            frame-based programming in AS3. Colin's article helps frame that notion
                            (pun intended).

                            > for instance, I have the AS3 Cookbook and it starts right from
                            > the beginning with packages;
                            >
                            > likewise, 99% of all the online tutorials do as well;

                            I just finished eleven chapters for a new O'Reilly title -- should be
                            available this June -- whose aim is to help bridge the gap between AS2 and
                            AS3. I suspect other publishers will get on board along similar lines and
                            may already have done so. Hang tight. :)

                            > and the CS3 documentation is written very Java-like, as opposed
                            > to common scripting language references;

                            I can see that, and it's written that way (I'm guessing) because the AS3
                            API overlaps strongly with the API for Flex. Writing out the sample code in
                            classes means they can easily be tested in both Flash and Flex Builder. But
                            how is "Java-like" documentation related in an opposing way to "common
                            scripting language references"? Java is definitely something I'd call
                            common -- while Flash (particularly with its frame-based scripting) is
                            something I would call uncommon, generally speaking.

                            I think I know what you're saying, though. I think you're wishing the
                            documentation included samples you could copy/paste into a frame script to
                            test. To a certain extent, you can do that with the class-based examples in
                            the AS3 Language Reference -- as long as you play a bit of surgery on the
                            code (drop the package and class terms, etc.; it takes some work).

                            Keep your chin up, though. :) If you're writing the sort of classes
                            you're writing in AS1, you've already demonstrated you have the capacity for
                            classes written in a more formalized approach.


                            David Stiller
                            Contributor, How to Cheat in Flash CS3
                            http://tinyurl.com/2cp6na
                            "Luck is the residue of good design."


                            • 11. Re: why is AS1 documentation not a part of CS3 help
                              Rothrock Level 5
                              Well then we shall have to disagree. What you have basically said is that what I have studied and worked really hard to become good at is not really a skill or anything valuable and that anyone can do it with almost no effort. :)

                              Well, I know you haven't really said that, but I think you are missing my point. My point is that for the truly advance and amazing things that people are envisioning and want to do, a more difficult type of programming is required and is necessary. You cannot make papervision3D out of procedural AS1.

                              I'm not saying there is no place for AS1/AS2 -- what I am saying is that you can still do all of what you originally did. There is nothing stopping those folks. And even 10 years from now if you have a computer than will run Flash CS3 you will still be able to do it. But progress marches on.

                              If you feel there is a need for a better book or instruction set, then make it! (PS: David is the author/coauthor on some excellent books. You should expect a "cookbook" to be very process oriented, but David's books are much more "why we do this" oriented.) Or hang out here and help every single person who has an AS3 question. I don't think either David or I would be at the place we are with our knowledge if it weren't for helping folks here.
                              • 12. Re: why is AS1 documentation not a part of CS3 help
                                dsdsdsdsd Level 1
                                I think that a theme that I have identified
                                over the last six months,
                                here in Chicago with agency people
                                and on the forums ( especially over the last couple of days ),

                                is that the AS3 proponents
                                are very uncomfortable recognizing
                                the potential for negative repercussions

                                if 95% ( I made that number up ) of the world's flash developers get so nervous
                                about the scripting interface - AS3 -
                                that they abandon ( maybe too strong of a word ) flash

                                and look for another product
                                that is a designer's tool ( face it, the internet matters because of shiny graphics )
                                with a left-brained scripting interface ( AS1 documentation and procedural AS1 coding )
                                whereby the cooperative programmers are still capable
                                of getting their rocks off ( big applications );


                                dsdsdsdsd
                                • 13. Re: why is AS1 documentation not a part of CS3 help
                                  Damon Edwards Level 3
                                  I think your mind set is very flawed. Do you think we would be where we are today without the progression of technology? Its natural for things to come and go, and get developed on. The AS language has come a long way, and is more powerful than ever. Although, now that it's apparent that you work for an ad agency, and I assume doing banner ads..?.. The use of the more complex scripting methods may not best suit you. So, why try and bash something that you don't understand? I hope you don't every expect to pick up a new language in 2 days, because thats ludicrous. However, back to your original topic, you can find all your AS1 help needs in the Flash CS3 help files by changing the drop-down to read "ActionScript 2.0". Then on any particular subject, you can see its Availability for player versions and ActionScript versions.
                                  • 14. why is AS1 documentation not a part of CS3 help
                                    dsdsdsdsd Level 1
                                    hey dzedward;

                                    don't be mad, I am not trashing and bashing;

                                    when I was in college ( physics ),
                                    the physics people associated with the math people
                                    who associated with the computer scientist people;

                                    the common thread was pragmatism;

                                    I am simply trying to decide for myself
                                    why I should abandon 7 years of AS1;
                                    is AS3 really offering something new?
                                    other than syntax and implementation;

                                    with AS1:
                                    - multi-user apps ( in conjunction with FCS or FMS )
                                    - real-time video communication
                                    - progressive and streaming media
                                    - module-based architectures
                                    - file-transfer methodologies
                                    - shiny '3d' carousels and other '3d' things
                                    - easing
                                    - database stuff

                                    from my understanding AS3 has,
                                    because of its underlying architecture,
                                    a much higher capacity for
                                    'large volume' applications,
                                    but don't mirror paradigms solve some of these issues;




                                    don't be mad at me;
                                    tell me what I don't know;

                                    thanks
                                    dsdsdsdsd

                                    • 15. Re: why is AS1 documentation not a part of CS3 help
                                      Level 7
                                      dsdsdsdsd,

                                      I won't interrupt your conversation with dz, but do keep in mind that
                                      Flash Player capabilities are at least as important as version of
                                      ActionScript.

                                      > I am simply trying to decide for myself
                                      > why I should abandon 7 years of AS1;

                                      I personally don't feel that I've abandoned x-number of years of
                                      anything. This stuff all builds on itself. :)


                                      David Stiller
                                      Adobe Community Expert
                                      Dev blog, http://www.quip.net/blog/
                                      "Luck is the residue of good design."


                                      • 16. why is AS1 documentation not a part of CS3 help
                                        Damon Edwards Level 3
                                        David brings in 2 other excellent points, Player version and capabilities go hand in hand. The new virtual machine AS runs in is much more high tuned, and runs quicker and more efficient (as long as you code accordingly). I couldn't agree more with David's statement "I personally don't feel that I've abandoned x-number of years of
                                        anything. This stuff all builds on itself. :)" Couldn't have said it better myself. Its natural progression, and you never forget what you've already learned, you use it in your knowledge bank to learn new ways, like building blocks. "crawl before you walk" type of thing. So, with your 7-years of experience, the transition should be much more manageable. Although AS3 is much more object oriented, and most the examples use external class files, doesn't mean you have to. You can code on the timeline like you could before. Only thing you can't do is attach code to an instance directly, which was said above I believe. However, you still can with publish setting set to AS2/AS1. I'm not mad at you at all, just thinking you should keep an open mind, cause you don't want to be left behind. Although ad agencies tend stay a few versions behind to get the maximum penetration.
                                        • 17. Re: why is AS1 documentation not a part of CS3 help
                                          Rothrock Level 5
                                          Designers who can't understand AS3 are building:

                                          - multi-user apps (in conjunction with FCS or FMS)
                                          - real-time video communication
                                          - progressive and streaming media
                                          - module-based architectures
                                          - file-transfer methodologies
                                          - shiny '3d' carousels and other '3d' things
                                          - easing
                                          - database stuff

                                          ????

                                          Really? With normal mode?I find that hard to believe. If you can do those things, you can learn AS3. And, despite dzedwards claim to the contrary, if you can build those I think you could learn AS3 in about 2 days -- well almost!

                                          Designers should design. Coders should code. Not saying they shouldn't work together and understand each other or that there aren't overlaps.

                                          There is nothing stopping anybody from continuing to use AS1/2. The real pressure will come from the folks who adopt AS3 and make such kick-*** better stuff that the AS1/2 folks are out of a job. It is the same thing that happend to the graphic designers who refused to make the jump to using computers -- hot lead, linotype, phototypesetters, dtp, and on and on. Overall that revolution didn't really reduce the overall numbers of designers -- in fact I would venture to guess we have more than ever. But it did reduce those who weren't keen on change. A lot of the old guard are doing something else now...
                                          • 18. why is AS1 documentation not a part of CS3 help
                                            dsdsdsdsd Level 1
                                            I think that maybe I am beginning to beat a dead horse,

                                            but

                                            I do not disagree that
                                            AS3 is an evolution
                                            ( though I do not see that for myself ... yet )

                                            what I am saying is that I believe ( though I am not convinced )
                                            that it may be an unnecessary evolution
                                            and simultaneously
                                            the evolution may weed-out 95% of the family ( all the normal, non-hard-core-programmer flash developers )


                                            my limited experience within agencies
                                            suggests that they are also contending with this same set of questions;
                                            and most seem to be struggling with the adoption of AS3
                                            ( I only know 1 true AS3 person in Chicago );

                                            technology integration is an economic question when you get right down to it;

                                            as best as I can tell,
                                            several of the ad agencies that produced Super Bowl commercials this year
                                            are, 2 years after the release of AS3, still struggling with the issue
                                            of AS3 integration in their interactive departments;

                                            for them, as best as I can tell,
                                            the only real plus side to AS3
                                            is the way it lends itself to in-house component libraries (which was do-able with AS1 ),
                                            but then that presents a new management issue
                                            ( whose going to create the protocols, where are they to be stored, how to prevent redundant development, etc )
                                            that they cannot seem to handle;


                                            also, again from my limited agency experience,
                                            only a small part of their flash development goes toward banner-ads,
                                            I would take a guess at 2-3% of overall flash development;

                                            but have you seen the ebay banner-ad ( no, I have nothing to do with it )?
                                            it provides real-time statistics on various current auctions -
                                            pretty cool;


                                            dsdsdsdsd
                                            • 19. Re: why is AS1 documentation not a part of CS3 help
                                              dsdsdsdsd Level 1
                                              Rothrock,

                                              quote:

                                              If you can do those things, you can learn AS3


                                              what about the other 95% of flash developers that
                                              are not hard-core programmers;

                                              thanks,
                                              dsdsdsdsd
                                              • 20. Re: why is AS1 documentation not a part of CS3 help
                                                Rothrock Level 5
                                                I'm sorry. I'm not seeing your point. So you are saying that 95% of flash developers can build those types of things with AS1 but that AS3 is too complex for them? Or are you saying that 5% of AS1 developers can build those things but that 95% of other developers can't learn AS3? We've got to compare apples to apples here.

                                                By your question I think you are making my point. Designers SHOULD NOT be making:

                                                - multi-user apps (in conjunction with FCS or FMS)
                                                - real-time video communication
                                                - progressive and streaming media
                                                - module-based architectures
                                                - file-transfer methodologies
                                                - shiny '3d' carousels and other '3d' things
                                                - easing
                                                - database stuff

                                                That is for hard core programmers. If you are making that stuff (and it works) you are a programmer and AS3 is a bit of a stretch perhaps, but completely doable. For the 95% they can still use the basic stuff in AS2 or learn basic stuff in AS3. The basic stuff is a bit different, but completely learnable.

                                                Be what you are going to be. If you are a programmer then be one. If you are a designer than be one. If you you are a designer and want to program then do that, but don't whine that it is hard.

                                                The issues you raise above are not new management issues.

                                                create the protocols
                                                where are they to be stored
                                                how to prevent redundant development, etc.

                                                Those are the same old issues of proper management that have always plagued people. The new AS2 and AS3 structures are a lot better for managing these types fo problems. Or perhaps under their old organization there was absolutely no way to centralize and reuse code placed on the bodies of 50 different movieclips, so there was no point in even trying to reuse it or prevent redundant development.
                                                • 21. why is AS1 documentation not a part of CS3 help
                                                  dsdsdsdsd Level 1
                                                  Rothrock,
                                                  quote:

                                                  So you are saying that 95% of flash developers can build those types of things with AS1

                                                  I doubt it;

                                                  but they can easily use AS1 for a good bit of simple-but-effective interactivity,
                                                  and meanwhile AS1 can handle the complicated stuff if the need-be;

                                                  so to me AS1 is the best of both worlds;


                                                  on the other hand,
                                                  AS3 is too complicated for that 95% - even the simple stuff
                                                  ( I am just basing that on my experience with AS3 and my observations of others ),
                                                  though AS3 can also handle the complicated stuff, but in a complicated way;

                                                  so to me AS3 is for only 5% of the flash people;
                                                  the rest need to quit flash and start finger-painting butterflies;


                                                  seriously, I think what I have gathered from this conversation,
                                                  is that the flaw with AS3
                                                  is its presentation:
                                                  docs, tuts, help files ;

                                                  starting the presentation with the phrase 'external classes'
                                                  is to misunderstand the audience -
                                                  95% of which like pretty butterflies;


                                                  I am still not convinced that AS3 is necessary
                                                  ( though I am working on my first AS3 project - shopping cart - but I will not use external packages );

                                                  just because an engineer can build a 800hp engine,
                                                  powerful enough to thrust a wing-adapted minivan
                                                  into flight
                                                  doesn't mean it is the right approach: do soccer moms even want to fly?

                                                  if someone could tell me some concrete thing
                                                  that AS3 can do that AS1 cannot
                                                  I would appreciate it;

                                                  again I am just trying to figure this AS3 thing out,
                                                  so don't rake me over the coals please;

                                                  dsdsdsdsd
                                                  • 22. Re: why is AS1 documentation not a part of CS3 help
                                                    Level 7
                                                    dsdsdsdsd,

                                                    > I am still not convinced that AS3 is necessary

                                                    It isn't.

                                                    > just because an engineer can build a 800hp engine,
                                                    > powerful enough to thrust a wing-adapted minivan
                                                    > into flight
                                                    > doesn't mean it is the right approach: do soccer moms even
                                                    > want to fly?

                                                    I do get your analogy. Really, I do. What I don't get is why you're
                                                    the one making it -- because based on what you've described, it sounds like
                                                    you're the engineer in this analogy, not the soccer mom. After reading
                                                    Colin Moock's article, I would think even the soccer moms should find
                                                    encouraged, but regardless ... of course you don't have to use AS3. ;)

                                                    If you don't, you're stuck with a different set of complexities, so it
                                                    all comes down to what you're comfortable with. In AS1/AS2, you have on()
                                                    and/or onClipEvent() for handling events. You also have the dot notation
                                                    equivalents (e.g. myClip.onRelease = handlerFunction). But wait, there's
                                                    more! You also have addListener(). How's that for consistent? Ah, but
                                                    then you also have addEventListener() -- just depends on which datatype
                                                    you're handling the event for. If you're a longtime Flash user -- and you
                                                    are -- then each new event handling model was something you took in stride.
                                                    If you're new to the scene, it could seem like a completely arbitrary mess.
                                                    In AS3 (outside of a drop-in-the-bucket NetStream exception), you have
                                                    addEventListener(). Easy to learn and easy to remember, because it's very
                                                    nearly consistent.

                                                    In AS1/AS2, if you want to instantiate a new MovieClip instance, you
                                                    have to refer to an existing MovieClip instance and invoke the
                                                    createEmptyMovieClip() method, give the new instance an instance name and
                                                    assign it a depth. In AS3, you just invoke the constructor: new
                                                    MovieClip(), then add the new instance to the display list.

                                                    It comes down to personal taste, I guess. To me, the newer models are
                                                    easier to use ... once you learn them (of course). There are trade-offs in
                                                    either camp, obviously.

                                                    > if someone could tell me some concrete thing
                                                    > that AS3 can do that AS1 cannot
                                                    > I would appreciate it;

                                                    I'm sure there are more, but here's a concrete thing off the top of my
                                                    head: AS3 allows you to reparent movie clips (and other visual display
                                                    objects) simply by removing them from the display list of one object and
                                                    adding them to another. A practical example that comes to mind is a jigsaw
                                                    puzzle, in which snapped-together pieces stay together, making it easy to
                                                    move snapped-together pieces as a single group. Each individual piece could
                                                    initially belong to the display list of the main timeline, but could be
                                                    moved to the collective display list of a group of snapped-together pieces.

                                                    Not that a single example should sway you. The example I made might
                                                    just be meaningless to you, because you might not be interested in
                                                    Flash-based jigsaws (or you might be interested, but would rather move
                                                    snapped-together pieces by way of some algorithm that tracks the position
                                                    and movement of each individual piece -- again, you're trading one set of
                                                    complexities for another; on the main, I personally find the complexities of
                                                    AS3 worth the learning curve).

                                                    > I am working on my first AS3 project - shopping cart - but
                                                    > I will not use external packages );

                                                    And you shouldn't, unless you feel that external classes would help you.
                                                    For me, I like the idea of utility classes (at least). In order to create a
                                                    dynamic text field in AS1 -- let's say a non-selectable text field, that
                                                    resizes as needed to fit the text, with a sans serif font -- you might do
                                                    something like this:

                                                    var tf = this.createTextField("myTextField", 0, 0, 0, 0, 0);
                                                    tf.selectable = false;
                                                    tf.autoSize = "left";
                                                    var fmt = new TextFormat();
                                                    fmt.font = "_sans";
                                                    tf.setNewTextFormat(fmt);
                                                    tf.text = "Lorem ipsum dolor sit amet";

                                                    (Note, this assumes Flash Player 8 or higher, because prior to Flash Player
                                                    8, the MovieClip.createTextField() method returns Void.)

                                                    So ... to me, that's a lot to type. Again (this is my mantra in this
                                                    post) ... one set of complexities for another. To reuse this code, I could
                                                    certainly throw it into a function. Let's say something like this:

                                                    function makeTextField(target, text) {
                                                    var tf = target.createTextField("myTextField" +
                                                    target.getNextHighestDepth(),
                                                    target.getNextHighestDepth(), 0, 0, 0, 0);
                                                    tf.selectable = false;
                                                    tf.autoSize = "left";
                                                    var fmt = new TextFormat();
                                                    fmt.font = "_sans";
                                                    tf.setNewTextFormat(fmt);
                                                    tf.text = text;
                                                    }

                                                    makeTextField(this, "Lorem ipsum dolor sit amet");

                                                    That's a tried and true procedural way to make your work easier. I
                                                    think, so far, you would agree ... and I think, for you, there's nothing new
                                                    so far. Notice that to keep instance names unique, I used
                                                    MovieClip.getNextHighestDepth() to append a number to the instance name, and
                                                    also to ensure that a safe depth is met. A real implementation would
                                                    probably include x,y positioning parameters, to make sure text doesn't
                                                    overlap ... but you get the idea.

                                                    I could use AS2 to create a utility class called, say, SimpleText.
                                                    Here's a stab at it. Quick and dirty AS2 external class file.

                                                    // Class file
                                                    class net.quip.utils.text.SimpleText {
                                                    public function SimpleText() {};
                                                    public static function makeTextField (target:MovieClip,
                                                    text:String):Void {
                                                    var tf:TextField = target.createTextField("myTextField" +
                                                    target.getNextHighestDepth(), target.getNextHighestDepth(),
                                                    0, 0, 0, 0);
                                                    tf.selectable = false;
                                                    tf.autoSize = "left";
                                                    var fmt:TextFormat = new TextFormat();
                                                    fmt.font = "_sans";
                                                    tf.setNewTextFormat(fmt);
                                                    tf.text = text;
                                                    }
                                                    }

                                                    More complex? In a sense, sure. Not by a whole lot, if you really look
                                                    at it. The AS1 function version was a teensy bit bigger than the
                                                    non-function version. The AS2 class version is a teensy bit bigger than the
                                                    AS1 function version. But once it's done, it's done. If I ever want this
                                                    functionality, I just import my class and use its (in this case) static
                                                    method:

                                                    import net.quip.utils.text.SimpleText;

                                                    SimpleText.makeTextField(this, "Lorem ipsum dolor sit amet");

                                                    In my experience, that saves me time and effort. And this same sort of
                                                    approach applies to non-static methods as well. It's just a way to organize
                                                    your code. Many people find it more efficient. If you don't, then you
                                                    don't. ;) It's as simple as that.


                                                    David Stiller
                                                    Adobe Community Expert
                                                    Dev blog, http://www.quip.net/blog/
                                                    "Luck is the residue of good design."