PDA

View Full Version : Please Help


su chi
08-24-2001, 01:24 AM
I Am Making A Flash Web Site and i came up to a small problem. Here is the situation....

i have a movie clip and inside that MC there is a button. When that button is Rolled Over it plays frame 2 of that MC and stops on frame 12, awaiting the users interactions with the animation that just played. Now here is my problem i have four MC in total on the root stage with the same situation. Lets say i'm working on the left most button. I want to do something like this.

when the MC has stoped on frame 12 and all the sub-buttons in that MC are displayed waiting for something to happen. i want a peice of code that will allow the user mouse to be cursered around in a specific area. For ezample if the Mc is fully deployed and waiting for something to happed the user only can move his mouse say 200 pixels up. If he exceds that number the button will return to its normal state.

here is a perfecr example

http://www.wireframe.co.za/large.htm

notice how the button (folder) returns to the closed state when the curser exceed a value from the left , right and top

can some1 please tell me how to do this, I have gave it many attempts but with no luck.

i beleive it has something to do with the if statement

if (_ymouse > 300)
gotoAndPlay (15)

would this be right, Also is there a way that you can explain how you got the pixcel calculation this is where i beleive my fault lies in


thanks

Jesse
08-24-2001, 04:37 AM
use hitTest. the best thing about hittest is that it expands its boundaries if the content expands, so you can have a box (set to alpha 0) which encompases all your sub buttons and if the mouse is not tounching that box, then you close that button:
if (!this.hitTest(_root._xmouse,_root._ymouse,false) {
// close
}
or similar