4 Replies Latest reply on Oct 20, 2006 5:24 AM by jgeorg

    Moving from Director to Flash

    jgeorg
      Hi all,
      I'm moving from Director to Flash and I try to understand some basic ActionScript elements.

      In Director I can write a piece of code (behavior) and I can attach this to any movieclip (sprite). How can I do this in ActionScript? Is there any useful documentation somewhere for Ex Director Users?

      Thank you in advance.
        • 1. Re: Moving from Director to Flash
          Level 7

          Hi jgeorg,

          I suppose you got the symbol and library stuff working...

          If you hava a movieClip on the stage, you can give it an instancename
          (bit like Director mx 2004's sprite-/channel-names) in the properties
          panel. If you have done so, you can easily address it with ActionScript.

          suppose:

          movieClips on the stage with instancenames of: test_01_mc and test_01_mc

          you can write AS:

          function identify(){
          trace(this);
          }
          test_01_mc.onPress = identify;
          test_02_mc.onPress = identify;

          you can also write anonymous functions, but than they would not be as
          easily reused like behaviors are:

          test_01_mc.onPress = function(){
          trace(this);
          };

          I don't really now about docuentation to make the transition from
          Director to Flash (I never fully made it ;)

          Hope this helps
          Manno

          jgeorg wrote:
          > Hi all,
          > I'm moving from Director to Flash and I try to understand some basic
          > ActionScript elements.
          >
          > In Director I can write a piece of code (behavior) and I can attach this to
          > any movieclip (sprite). How can I do this in ActionScript? Is there any useful
          > documentation somewhere for Ex Director Users?
          >
          > Thank you in advance.
          >

          --
          ----------
          Manno Bult
          manno@xs4all.nl
          • 2. Re: Moving from Director to Flash
            Level 7
            In addition to what Manno said, you can also write external class files in
            order to easily re-use code. You can write classes just like parent scripts
            in Director, that you instantiate into a variable: var bgPreloader = new
            MerkelLoader() will instance class MerkelLoader with bgPreloader referencing
            it. You can also have classes extend the MovieClip class. You do that by
            setting the class name in the Linkage properties of the clip. Once you set a
            clip's class, any instances of that clip you place on stage (or attach
            dynamically) will have the extra methods of your class available.

            There's no cast like Director where all your code is neatly placed. You just
            need to get used to class files, packages and keeping your code external.
            Besides, doing it this way is the norm for most programming these days and
            allows you to use a CVS if you're working with a team.

            Grab Flash Develop and use it:
            http://www.flashdevelop.org/community/viewtopic.php?t=1040

            It's a _much_ nicer editor than either Director or Flash have. Believe me,
            you'll hate coding in Flash's script editor if you're used to Director's.
            One of the most annoying things ever is that there's no method drop-down
            menu like there is in the Lingo editor. You must scroll through all your
            code to find a function, or use Find... it's a real pain and I have always
            been bothered by the lack of this. In Flash Develop you see all your method
            names in their own pane - click one and you go to it. It's good stuff... It
            does not feature CVS though... If you need that you'll want Eclipse with
            FDT - nicer than FlashDevelop but FDT costs like $150.

            Anyway, coming from Director to Flash will take some getting used to. The
            workflow is just a little different. But you'll come to appreciate Flash.


            --
            Dave -
            Head Developer
            www.blurredistinction.com
            Adobe Community Expert
            http://www.adobe.com/communities/experts/


            • 3. Re: Moving from Director to Flash
              Level 7

              Dave,

              just a quick glance at FlashDevelop made me smile about time saved in
              future projects. Thanks!

              Manno


              DMennenoh **AdobeCommunityExpert** wrote:
              > In addition to what Manno said, you can also write external class files in
              > order to easily re-use code. You can write classes just like parent scripts
              > in Director, that you instantiate into a variable: var bgPreloader = new
              > MerkelLoader() will instance class MerkelLoader with bgPreloader referencing
              > it. You can also have classes extend the MovieClip class. You do that by
              > setting the class name in the Linkage properties of the clip. Once you set a
              > clip's class, any instances of that clip you place on stage (or attach
              > dynamically) will have the extra methods of your class available.
              >
              > There's no cast like Director where all your code is neatly placed. You just
              > need to get used to class files, packages and keeping your code external.
              > Besides, doing it this way is the norm for most programming these days and
              > allows you to use a CVS if you're working with a team.
              >
              > Grab Flash Develop and use it:
              > http://www.flashdevelop.org/community/viewtopic.php?t=1040
              >
              > It's a _much_ nicer editor than either Director or Flash have. Believe me,
              > you'll hate coding in Flash's script editor if you're used to Director's.
              > One of the most annoying things ever is that there's no method drop-down
              > menu like there is in the Lingo editor. You must scroll through all your
              > code to find a function, or use Find... it's a real pain and I have always
              > been bothered by the lack of this. In Flash Develop you see all your method
              > names in their own pane - click one and you go to it. It's good stuff... It
              > does not feature CVS though... If you need that you'll want Eclipse with
              > FDT - nicer than FlashDevelop but FDT costs like $150.
              >
              > Anyway, coming from Director to Flash will take some getting used to. The
              > workflow is just a little different. But you'll come to appreciate Flash.
              >
              >

              --
              ----------
              Manno Bult
              manno@xs4all.nl
              • 4. Re: Moving from Director to Flash
                jgeorg Level 1
                Thanks for the info!