i got the drop down menu to come down once rolled over but it cancels out all other actions meaning it cancels the functions of the rest of the menu none of my other buttons work now. how can i fix this?
each button has its own action ie:
onClipEvent (load) {
num = 3;
}
on (rollOver) {
if (_root.link != num) {
this.gotoAndPlay("over");
}
}
on (releaseOutside, rollOut) {
if (_root.link != num) {
this.gotoAndPlay(_totalframes - _currentframe);
}
}
on (release) {
if (_root.link != num and _root.animation == 1) {
_root.animation = 0;
_root.link_prev = _root.link;
_parent[("item" + _root.link)].gotoAndPlay("out");
_root.link = num;
_root.main.play();
}
}
then i created a button to frame the drop down movie and gave it the following action:
on(rollOver){
PastorMenu.play();
}
when i try to put in the same as the main button it doesnt come down when rolled over. but done this way it will come down but none of the other main menu buttons work.
thanks in advance to anyone who can help
first, remove all code from objects. it's difficult to debug and maintain and very difficult to help you. so:
var tl:MovieClip=this;
yourbutton.onRelease=function(){
tl.onMouseDown=checkSubmenuF;
// the rest of you code
if (_root.link != num and _root.animation == 1) {
_root.animation = 0;
_root.link_prev = _root.link;
_parent[("item" + _root.link)].gotoAndPlay("out");
_root.link = num;
_root.main.play();
}
}
function checkSubmenuF(){
if(submenuitem.hitTest(_xmouse,_ymouse)){
// do whatever
} else {
// do whatever else
}
delete this.onMouseDown;
}
you assign instance names to everything that needs to be referenced using actionscript and you apply your mouse handler methods to that instance name:
yourbutton.num=3;
yourbutton.onRollOver=function(){
//
}
yourbutton.onRelease=function(){
//
}
yourbutton.onReleaseOutside=yourbutton.onRollOut=function(){
//
}
I tried this but they are movie clips so its not working ....
here is the actually file so you can see what i mean. http://www.sendspace.com/file/pc2rjt
thanks a million for your help i really appreciate it
North America
Europe, Middle East and Africa
Asia Pacific