2 Replies Latest reply on Mar 4, 2010 11:41 AM by Bear Travis

    Nesting buttons?

    rvlaha

      Is there a way to place a button within another button?

       

      I'm trying to create an inline form that is launched by a button that only becomes visible when an item is rolled over. I'd like it to be nested because I need the whole process to be used on multiple rollovers on the same page.

       

      The problem is that when it's nested inside the "rollover" button, it won't activate.

       

      Thanks!

        • 1. Re: Nesting buttons?
          Bear Travis Adobe Employee

          Hello,

           

          Nesting a button won't do what you're looking for. A button has a predefined set of behaviors that are not as flexible as what you're trying to do.

           

          However, you'll be happy to know that you can still accomplish what you're looking for. Here's how:

          1. Create a custom component (it will contain the button, mine was just a rectangle)

          2. Enter Edit In Place on the new component by double clicking on it in the Artboard

          3. Create two states on the component (in the Pages/States panel, right click on State1 and choose "Duplicate State")

          4. In the second state, add your button.

          5. Exit Edit In Place

           

          Now we need to define the actions that will show / hide the button on mouse events.

          1. Select your custom component in the artboard

          2. In the Interactions panel, select "Add Interaction" -> "On Roll Over" -> "Play Action Sequence"

          3. In the timeline panel, select the action sequence, and click "Add Interaction" -> "Set Component State" -> "State2" (you need to select State in the Properties Panel in the lower right)

          4. Repeat step 2, only "On Roll Out" -> "Play Action Sequence"

          5. Repeat step 3, only for your On Roll Out action sequence, and "Set Component State" -> "State1"

           

          You can mess around with exactly where to place the actions, but this should give you a start.

           

          -Bear

          • 2. Re: Nesting buttons?
            rvlaha Level 1

            Bear,

             

            Excellent feedback. I had figured out half of the problem, but you brought me the rest of the way.

             

            Thanks,

            Rick