5 Replies Latest reply on Aug 12, 2008 7:18 AM by Nick_Ka

    Button onRelase not firing

    Nick_Ka
      I created an "action" layer. Selecting that layer I double clicked on a button, inv_btn. This button is invisible and is the size of the entire flash ad.

      This brings up an interface showing Up, Down, Over, Hit. I then drag the default Up over to Hit.

      I then go back to the "action" layer and select the first frame. I then add the following action script:

      inv_btn.onRelease = function(){
      getURL(" http://myweb.com","_blank");
      }

      This event never fires. I ran it in a browser. I even published it and ran it. How do I get this event to fire?
        • 1. Re: Button onRelase not firing
          DLMAES
          Did you make sure to name your button instance, in the insance name field? Also I'd put the button on a seperate layer than your actions layer.
          • 2. Button onRelase not firing
            Nick_Ka Level 1
            I have been able to narrow down why this is failing. I do have an "action" layer and I do have an instance name of my button.

            My background is not a rectangle but has rounded corners. The button is a rectangle. When I hover over the corners the mouse cursor turns into a pointer and I am able to click and bring up a new web page via getURL().

            It seems like the button is under the background and I want to be able to click anywhere on the ad to fire this event. I cound find no properties of the button that would allow me to do that. the button is the same size as the flash ad. any ideas?
            • 3. Re: Button onRelase not firing
              Nick_Ka Level 1
              I got it working. Even though I was placing the rectangle which was to become a button on a button layer, it appears the rectange was being placed on the background. I noticed this when I clicked on the background shown in the button layer and my layer then changed to background. I made the button larger than the stage and got it working.
              • 4. Re: Button onRelase not firing
                DLMAES Level 1
                Ok sounds good, glad you figured it out... Thanks!
                • 5. Re: Button onRelase not firing
                  Nick_Ka Level 1
                  I created a second flash ad and ran into the same problem. The button event never fires and the mouse cursor does not change. I've been reading tutorials on creating a flash ad and I'm not able to figure this out.

                  What should I check to get the invisible button to work?