I can't seem to get this button to trace("hi"); Can someone take a look at it? Just change the filename from ".txt" to ".fla"
Hi, I can probably tell you why without looking at it. Your button instance is nested in another movieClip. Because of that, the _parent movieClip is intercepting your onClick behaviour and your button doesn't react. You will need to test the mouse click and then see if it is over the button with some sort of .hitTest(); I hope that helps, cheers,
You are absolutely correct. I tried using a MovieClip as a button, and nesting that, but still no effect. Plus the hit test has confirmed that the _parent MovieClip is intercepting the click. Is there a quick/dirty workaround for this, or am I back to square one? Thanks in advance.
Well, the way to do it is to determine the position of the click when you click the _parent movie. Then find the _root._xmouse and _root._ymouse positions and test if these coincide with the position of the button... With the button, it is usually best to make that a movieClip instance and not an actual button. Then if your condition is met for the mouse being over the button, it fires of the myButton.onRelease() function call instead. Search the archives for 'nested buttons' or 'buttons in movieClips' and see what you get... there have been thousands of posts on this and various neat solutions. cheers,
Don't see what you're looking for? Try a search.
|