First off, I’d like to thank Ken Brown for this handy tutorial.
http://www.flashkit.com/tutorials/Actionscripting/How_to_m-Ken_Brow-997/index.php
The code used here is:
[color=red]onClipEvent(load){
//is the cursor over the movie clip
previouslyOver=false;
}
onClipEvent(enterFrame){
currentlyOver=this.hitTest(_root._xmouse,_root._ymouse,true);
//if there is a change, go to another frame
if(!previouslyOver and currentlyOver){
previouslyOver=true;
this.gotoAndStop(“on”);
} else if (previouslyOver and !currentlyOver){
previouslyOver=false;
this.gotoAndStop(“off”);
}
}[/color]
[color=red][color=black][/color][/color]
[color=red][color=black]Ok, this code works fine. I’ve attached this to a movie clip which contains a button within it. The way it works is when you rollover it, the dropdown comes out. So up to this point, everything is fine and dandy until I accidently click the trigger movieclip button (the one that drops the menu down)… and then the button quits working. Now I could disable the hand when scrolling over, but if they still click on accident, the button quits working until you refresh the screen. My only solution is to make it only come down when clicked instead of rolling over it. I’m hoping there is a way to refresh it if someone does click on it, but not sure how to do that?[/color][/color]
[color=red][color=#000000]Any help is GREATLY appreciated. :-/ [/color][/color]
[color=red][color=#000000][/color][/color]
[color=red][color=darkorange]Note: If anyone else does use this code and puts buttons inside of the movie clip and wants to load a swf into a targeted movieclip, be sure to [/color][/color][color=red][color=darkorange]add [/color][/color]
[color=red][color=darkorange]_root.(targetmovieclip) so that it’ll function properly. I’m still getting use to actionscript and figured for any newbies, you’d probably run across the same problem.[/color]
[/color]