1st. make sure the code is
on the mc (not inside the mc).
use hittest to make sure that the mouse is hitting the mc.
since your not useing an actual button object, you cant use 'release' thats a button method.
so heres the code that works:
Code:
onClipEvent (load) {
stop();
clicked = false;
}
//this works
//onClipEvent(mouseUp){
// if(this.hitTest(_root._xmouse,_root._ymouse,false)){
// if (clicked == false){
// gotoAndStop(2);
// clicked = true;
// }else{
// gotoAndStop(1);
// clicked = false;
// }
// }
//}
//so does this... (maybe not in 5).
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
gotoAndStop(clicked ? 1 : 2);
clicked = !clicked;
}
}
both mouse up methods work, i just thought i would do both.
heres the fla... it was created with mx, but published for 5, so hopefully you will be able to open it.