|
-
hitTest mis-script
Hi, I will be very grateful if someone can help me with the following:
I have attached a mc to the mouse and then my buttons no longer worked as the mc was between the pointer and my buttons. So I changed my buttons into mcs and put hitTest script on the mcs. I probably mis-scripted this but the desired effect (ie that the button/mc disappears on rollOver and appears again on rollOut) is not achieved - it disappears but does not reappear on rollOut. This is the script:
attachedToMouse_mc.onEnterFrame=function(){
if (this.hitTest(wasButton_mc)){
hit = true;
trace("hit");
wasButton_visible = "0";
}else if (hit != true) {
trace("no hit");
wasButton_visible = "1";
}
}
I used the trace to determine whether this script was working and "no hit" works initially until rollOver and then no more.
What is my mistake?
Michelle.
-
Registered User
These changes may halp.
attachedToMouse_mc.onEnterFrame=function(){
if (this.hitTest(wasButton_mc)){
hit = true;
trace("hit");
wasButton._visible = 0;
}else if (hit != true) {
trace("no hit");
wasButton._visible = 1;
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|