A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] simple button not working within movieclip

  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    18

    resolved [RESOLVED] simple button not working within movieclip

    I have a simple getURL button within a movieclip within another movieclip. Does anyone have any clue why this isn't working? The button is in the top layer of the child movieclip, and the child movieclip is in the top layer of the parent movieclip, so what am I missing here? I attached a simplified fla to show the issue. In the end, the main red box will be a country on a map and the popup box will contain info about the country and links to pictures and sites. Any help will be really appreciated.
    Attached Files Attached Files

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Make it a movie clip, instead of a button...
    Code:
    onClipEvent (mouseDown) {
    	if (this.hitTest(_root._xmouse, _root._ymouse)) {
    		trace("getURL");
    	}
    }

  3. #3
    Junior Member
    Join Date
    Jan 2002
    Posts
    18
    Doesn't the onClipEvent handler trigger the action no matter where the user clicks? I want to make sure they have to click on the button. (sorry in advance, I'm new to actionscript)

  4. #4
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Yes, but the 'hitTest' function will make sure the mouse is over the movie clip.

  5. #5
    Junior Member
    Join Date
    Jan 2002
    Posts
    18
    Oh! I see, thanks so much, it works

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