A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Button in a movieclip

  1. #1
    Junior Member
    Join Date
    May 2006
    Posts
    21

    Button in a movieclip

    I've created a menu and made it a movieclip. On the movieclip are the menuitems which I've created as buttons. On the buttons is the following actionscript:

    Code:
    on (release) {
    	this.getURL("http://www.donsayersassociates.com","_blank");
    }
    The menu is then placed on my main stage.

    The problem is when I test the movie the movieclip doesn't seem to register it as a button at all. The link doesn't fire and the rollOver events don't seem to do anything.

    Is there a restriction for a button in a movieclip.

  2. #2
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    Does the menu movieclip have any mouse interactions? If so they may be interfering with the button actions.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  3. #3
    Junior Member
    Join Date
    May 2006
    Posts
    21
    Nope, no mouse interactions on the movieclip. I have noticed something new though. The first button which simply says "Menu" seems to work correctly, but the rest aren't at all.

  4. #4
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    Strange. Hard to tell without seeing the FLA.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  5. #5
    Junior Member
    Join Date
    May 2006
    Posts
    21
    Fair enough. I'll strip out the menu since the main flash has some sensitive info in it.
    Attached Files Attached Files

  6. #6
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    Your rollout effect on the MenuTitle Clip seems to be intefering with the buttons. It works when I move that layer to the bottom, however, doing that makes the rollout trigger very easilly and it is hard to get onto the buttons without triggering the rollout. However, that does seem to be what is keeping the buttons from working.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  7. #7
    Junior Member
    Join Date
    May 2006
    Posts
    21
    I noticed that to. I thought I had changed it already. I arranged the rollout button behind the others and it seemed to work for the first button, but that's all. So if I put the rollout on its own layer below them all it should work.


    Edit: Yep. That's what it was. Thanks for the help.
    Last edited by ben_stilwell; 06-07-2006 at 01:26 PM.

  8. #8
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    It worked for the first button because you had the code directly on the button. The other ones had no code on them.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center