Conflict between Slider and Buttons?
Help Please!
I have used the slider successfully to move between frames 43 and 60 in an individual scene:
stop()
function moveAlong_ff(evt:Event):void {
gotoAndStop(sl_ff.value);
}
sl_ff.minimum = 43;
sl_ff.maximum = 60;
sl_ff.liveDragging = true;
sl_ff.addEventListener(Event.CHANGE, moveAlong_ff);
this.addEventListener("enterFrame",onEnterFrame_ff);
function onEnterFrame_ff(e:Event) {
sl_ff.value = this.currentFrame;
}
And I have also managed to set up some buttons that navigate between scenes successfully:
ff_btn2.addEventListener(MouseEvent.CLICK, jump11);
function jump11(event:MouseEvent):void
{
gotoAndPlay(1,"Scene2");
}
fb_btn2.addEventListener(MouseEvent.CLICK, jump12);
function jump12(event:MouseEvent):void
{
gotoAndPlay(1,"Scene3");
}
bs_btn2.addEventListener(MouseEvent.CLICK, jump13);
function jump13(event:MouseEvent):void
{
gotoAndPlay(1,"Scene4");
}
However, when the above scripts are present together there seems to be some kind of conflict and I get the error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at trailfresh_demo_19_fla::MainTimeline/onEnterFrame_ff()
Can anyone help as I'd really like to be able to navigate between scenes using buttons and also have the slider work in individual scenes?