Hi,
I am creating a simple button that loads a sound file when it’s clicked. The button works fine, but I have a problem with the handler…
this.butt_mc.onMouseDown=function() {
_global.ctr=0;
if(ctr==0) {
butt_mc.gotoAndStop("_over");
my_sound.stop();
ctr=1;
trace(ctr);
}
else if(ctr==1) {
butt_mc.gotoAndStop("_up");
my_sound.start();
ctr=0;
trace(ctr);
}
}
This is the code. The strange thing is that when i use butt_mc.onPress as the event handler, the butt_mc ("_over") state is shown on rollover itself, clearly violating the handler’s scope, as the handler is only supposed to execute the code when the mouse is pressed rite ?, By default it was supposed to be butt_mc.onPress, but I had to change that due to this problem, so I now use MouseDown.
But here, I note that the hand cursor (which is there by default) does not show up. How can you get that back ?, that’s my question. Otherwise, ppl won’t know that the object they rolled over is a button. Is there a code for that ?
Vj