3 Replies Latest reply on Sep 22, 2006 8:34 AM by sdiuhwer

    make transparent "buttons" just for function?

    sdiuhwer Level 1
      I tried to make hyperlinks when I click text of vita, art, statement, for example.
      I just want to make sure what I am doing is right.

      - Instead of making buttons for each of text ( i.e., vita, art, statement),
      - I will make one transparent "button" symbol (which means just 0% alpha setting for color on Up/Over/Down but some color on Hit state).
      - then I will place this transparent button under the each text.
      - then, select each button, and make get URL actionscript.

      Is this transparent button will work do you think?
      One more question. If I put this button under "statement" text, can I scale to make bigger enough to cover the text?

      Or do you make each button symbols for vita, art, statement of text?
      Thanks in advance!
        • 1. Re: make transparent "buttons" just for function?
          Damon Edwards Level 3
          yes, it will work. yes, you can scale it using the free transform tool (q)..but remember if you copy and paste it, to change the url in the actions cause it will have the same url you copied from.
          • 2. Re: make transparent "buttons" just for function?
            Level 7
            >> Instead of making buttons for each of text ( i.e., vita, art,
            >> statement), I will make one transparent "button" symbol

            That's a good way to go. :)

            >> (which means just 0% alpha setting for color on Up/Over/
            >> Down but some color on Hit state).

            Actually, *all* you need is some shape on the Hit frame. The other
            frames can be empty. That makes it easiest.

            >> then I will place this transparent button under the each text.

            I would place it over each text, not under.

            > then, select each button, and make get URL actionscript.

            Sure. Or any other action.

            >> If I put this button under "statement" text, can I scale to
            >> make bigger enough to cover the text?

            Absolutely.

            >> Or do you make each button symbols for vita, art, statement
            >> of text? Thanks in advance!

            No, no! Use one single button symbol -- that's the whole point: one
            symbol used for many purposes ... saves on SWF file size and makes your
            Library less cluttered.

            > yes, it will work. yes, you can scale it using the free transform
            > tool (q)..but remember if you copy and paste it, to change the
            > url in the actions cause it will have the same url you copied from.

            That all depends on how you're handling those button events. Back in
            Flash 5 (that's quite a while ago), you had to use on() or onClipEvent(),
            but since Flash MX (aka 6), it's been possible to put all your code into a
            single script layer. This is the current recommended "best practice," and I
            agree with it. Just give each button instance -- in this case, each copy of
            that single "invisible" button -- an instance name. You accomplish that by
            selecting each button on the Stage, in turn, and filling in the Instance
            Name field in the Property inspector.

            Then use each instance name in a frame script and assign a function to
            the Button.onRelease event for each:

            buttonA.onRelease = function() {
            getURL(" http://www.domain.com/page.html");
            }
            buttonB.onRelease = function() {
            getURL(" http://www.domain.com/some_where_else.html");
            }
            // etc.


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


            • 3. Re: make transparent "buttons" just for function?
              sdiuhwer Level 1
              Thanks much, David Stiller. Your explanation was really helpful and clear to understand my questions.