Hughless
04-16-2009, 04:29 PM
Hi. I've literally started ASing today and trying my hand at a a site intro page. I've come up against this problem which a lot of people seem to have but none of the solutions I've found online seem to be helping me.
So I'm trying to get a simple button to animate when rolled over. Although I'm beginner I'm as sure as I can be that I've got all the timeline stuff fine-tuned and that my problem is purely code based. Here's my error message:-
TypeError: Error #2007: Parameter listener must be non-null.
at flash.events::EventDispatcher/addEventListener()
at splash4_fla::MainTimeline/frame96()
Here's my short bit of code:
b2.buttonMode=true;
b2.addEventListener(MouseEvent.ROLL_OVER,b2.Over);
b2.addEventListener(MouseEvent.ROLL_OUT,b2.Out);
b2.Over=over;
b2.Out=out;
function over() {
this.gotoAndPlay(9);
}
function out() {
this.gotoAndPlay(1);
}
I don't really know what might be the problem so any insight would be appreciated. Thanks.
So I'm trying to get a simple button to animate when rolled over. Although I'm beginner I'm as sure as I can be that I've got all the timeline stuff fine-tuned and that my problem is purely code based. Here's my error message:-
TypeError: Error #2007: Parameter listener must be non-null.
at flash.events::EventDispatcher/addEventListener()
at splash4_fla::MainTimeline/frame96()
Here's my short bit of code:
b2.buttonMode=true;
b2.addEventListener(MouseEvent.ROLL_OVER,b2.Over);
b2.addEventListener(MouseEvent.ROLL_OUT,b2.Out);
b2.Over=over;
b2.Out=out;
function over() {
this.gotoAndPlay(9);
}
function out() {
this.gotoAndPlay(1);
}
I don't really know what might be the problem so any insight would be appreciated. Thanks.