2 Replies Latest reply on Jan 9, 2009 5:59 AM by Newsgroup_User

    Can't add action to button?

    Greg Parks Level 1
      I haven't used Flash for a long time and I'm about to scream. (Okay, I've been screaming for a while now.) I'm trying to add a simple getURL script to a simple text button-- should be really simple, right? But when I select the instance of the button on the stage it says the current selection cannot have actions applied to it. This, despite the fact that I am able to open an old .fla that has the same type of button and it does have a getURL action applied. What gives?

      Flash version 9.0 (CS3 Professional)

      (I apologize if this has been handled in previous posts-- the search function on this forum is currently broken.)

      --Cross-posting this message to ActionScript 3 forum
        • 1. Re: Can't add action to button?
          Level 7
          Greg,

          > I haven't used Flash for a long time and I'm about to scream.
          > (Okay, I've been screaming for a while now.) I'm trying to
          > add a simple getURL script to a simple text button-- should
          > be really simple, right?

          You'll be relieved to discover that it still is simple; it's just that
          you have options now. :) Finding the approach that works for you will
          depend on the version of ActionScript you're using, and your comfort level
          with more recent ActionScript workflows.

          The shortest, quickest answer for you is probably to configure your FLA
          for ActionScript 2.0 or 1.0, both of which support direct attachment of
          code. Use File > Publish Settings > Flash to change your AS version. (In
          Flash CS3 and CS4, you also have an option between AS3 and AS2 when you
          create a new FLA.) The "trick" here is simply that ActionScript 3.0 does
          not support direct attachment of code.

          If you want to try the new way, you'll have to put your code in a
          keyframe, rather than on the button itself. This approach requires that you
          give your button(s) an instance name, so that Flash knows which object(s)
          you mean. Here's a quick example, from a slightly dated (but still useful)
          blog entry:

          http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3


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


          • 2. Re: Can't add action to button?
            Ned Murphy Adobe Community Professional & MVP
            If your publish settings are for AS3, then you cannot apply actions to objects. Change your publish settings to AS2 and the problem should go away.