2 Replies Latest reply on Apr 30, 2007 9:30 AM by Optikalefx

    Screed Against on(clipEvent)

    Rothrock Level 5
      I am continually amazed at the number of people who are just now coming to Flash (or have only just started learning a bit of Actionscript) and post questions regarding on(someClipEventOrOther). I'm trying to understand who and/or what is guiding them to using this type of pre-Flash MX (6) style of coding.

      Flash 6 was released early in 2002 and introduced all the MovieClip.onSomeClipEventOrOther events. The benefits of being able to put all your code in one place (or at least in more controlled places) and not having to search around to make changes are truly amazing. Personally I haven't used the on(clipEvent) structure since 2002. And I suspect that most folks here who do a lot of development use it very sparingly if at all? Am I correct in this assumption?

      Personally I seldom answer questions that involve that kind of code because I just don't remember all the in-outs-and-little-tricky-bits about using it. Scoping issues, does the clip exist at the correct time, what is the path from it to other things on the stage, what is their code and properties, etc. It just gets too hard to debug and follow when it is so broken up. Or maybe it is just me?

      I'm just trying to start a community dialog about this and am wondering if there is someway we can encourage/lead new folks to not using that style of coding? Or does everyone think that it is a good thing?

      PS: I used to be crazy and rabid about the use of _root, and I would just like to point out that we don't seem to have so many questions that revolve around _root anymore, now do we? :)
        • 1. Re: Screed Against on(clipEvent)
          dr_ross Level 1
          Find it best to tell people starting to learn, don't bother opening any books older than Moocks Flash MX, just throw them in the bin. Especially anything with "all new for Flash 4" in the title.

          Don't buy your books from a charity shop kids (even the cat protection league), theres plenty of better tutorials free on the internet.

          I Find people stop using "on(whateverEvent)" when they see how much easier it is to have all the timeline code in one place for themselves. Sometimes its best to learn the hard way.

          And Slides are the work of the devil.
          • 2. Re: Screed Against on(clipEvent)
            Optikalefx Level 1
            People need to discover that they dont need on(whatever) on thier own. telling them they dont need, well if ur a programmer you have to find out for yourself to beileve. But i still use it every now and again when im 50 timelines deep and dont feel like making an absolute path.