xanti
06-19-2007, 03:43 PM
As a Flash/ActionScript noob I find the podcasts at www.learnflash.com really helpful and have been following a 2005 one (http://www.learnflash.com/wp/2005/creating-movie-clip-buttons/) to learn how to make movie-clip buttons. I'm using Flash CS3.
However, when I finish creating the button and come to execute the code
this.button_mc.onRollOver = function() {
button_mc.gotoAndPlay("_over");
}
this.button_mc.onRollOut = function() {
button_mc.gotoAndPlay("_out");
}
I get a compilation error (posted below because this post seems to cut itself off after the statement). I vaguely understand what it means, but don't know how to do it. I tried adding
addEventListener ('mouseOver', callback_handler)
as the first line of the script (and ditto for onRollOut) substituting onRollOver/Out for callback_handler and it executed OK, but just cycles through the animation without reacting to mouse movements.
Can someone please tell me what I need to do here? The error message is
Warning: 1090: Migration issue: The onRollOver event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'mouseOver', callback_handler).
However, when I finish creating the button and come to execute the code
this.button_mc.onRollOver = function() {
button_mc.gotoAndPlay("_over");
}
this.button_mc.onRollOut = function() {
button_mc.gotoAndPlay("_out");
}
I get a compilation error (posted below because this post seems to cut itself off after the statement). I vaguely understand what it means, but don't know how to do it. I tried adding
addEventListener ('mouseOver', callback_handler)
as the first line of the script (and ditto for onRollOut) substituting onRollOver/Out for callback_handler and it executed OK, but just cycles through the animation without reacting to mouse movements.
Can someone please tell me what I need to do here? The error message is
Warning: 1090: Migration issue: The onRollOver event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'mouseOver', callback_handler).