6 Replies Latest reply on May 28, 2008 4:41 PM by Dr.Funky

    Actionscript editing

    Dr.Funky Level 1
      I'm new to CS3; I'm editing a flash movie that someone else made, and I cannot find a piece of Actionscript, it's driving me crazy . I know it is in there somewhere because I decompiled the swf, but when looking at Actions (F9) it doesn't show up. Do you have an idea where I have to look? I've attached the start of the code below.

      In the debugging file (swd) this code is preceded by: Actions for [No instance name assigned] (Brrn_Bttn)

      Thanks in advance...
        • 1. Re: Actionscript editing
          Level 7
          Dr.Funky,

          > button 6 {
          >
          > on (rollOver) {
          > ...

          When you see on() or onClipEvent(), it means the code is attached
          directly to an object, such as a button, rather than to a frame, which is
          the currently recommended best practice.

          Open your Actions panel and start clicking on objects to select them.
          You might have to double-click objects to enter into *their* timelines, then
          repeat the click-to-find process. It can get very tedious (and this is why
          it's considerably more helpful to put all your code -- or 90% of your
          code -- into keyframes. Not just that, but keyframes of a layer
          specifically set aside for ActionScript. Much easier to find.


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


          • 2. Re: Actionscript editing
            Dr.Funky Level 1
            quote:

            Open your Actions panel and start clicking on objects to select them.


            Can you clarify what you mean by this? Where exactly do I select these objects? When I use the "Edit Symbols" icon in the Timeline panel or Symbol Definitions in the Actions panel, I get different timelines, but not the script I'm looking for.
            • 3. Re: Actionscript editing
              Level 7
              Dr.Funky,

              > Can you clarify what you mean by this? Where exactly do I
              > select these objects?

              Assuming the object in question is a button (re: "button 6" from your
              first post), you'll have to click around until you find the button symbol
              that presumably holds this code.

              > When I use the "Edit Symbols" icon in the Timeline panel or
              > Symbol Definitions in the Actions panel, I get different timelines,
              > but not the script I'm looking for.

              In this case -- again, because of the reference to on() and
              onClipEvent() -- your code is attached to the *surface* of your symbols, not
              to frames in their internal timelines. You won't be editing symbols here,
              but rather, selecting each in turn by a single click. Select your symbols
              as they appear on the Stage (not in the Library). Keep your Actions panel
              open as you do, and you'll see the code change.


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


              • 4. Re: Actionscript editing
                Dr.Funky Level 1
                OK I understand what you mean and I've been able to follow your instructions on a sample file that I found on the web. However, in my file, the button in question is not visible on the stage...

                If you would care to look at the file, it's at this location. You can see the movie in action here. The buttons in question are the menu items on the left, which I don't see on stage if I open the fla file.
                • 5. Re: Actionscript editing
                  Level 7
                  Dr.Funky,

                  > OK I understand what you mean and I've been able to
                  > follow your instructions on a sample file that I found on
                  > the web. However, in my file, the button in question is
                  > not visible on the stage...

                  It really can be confusing, I agree. Since your buttons aren't on the
                  Stage to begin with, they're either being brought to the Stage via
                  ActionScript or via animation (i.e., nested inside a movie clip).

                  Take a look at your Mvie_Bttn and Mvie_BttnsubMenu movie clips in the
                  Library panel. Double click Mvie_Bttn, for example, to enter that movie
                  clip's timeline. When you do, you'll see a couple rectangles in the Stage
                  area (think of this as the "stage" of this particular movie clip). Those
                  rectangles are a text field and a button symbol. Carefully select that
                  button symbol and open the Actions panel.


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


                  • 6. Re: Actionscript editing
                    Dr.Funky Level 1
                    Great I finally found the code I was looking for! Thanks for your help David!