Jump to content


Somthing is wrong here, Pls help!


  • You cannot reply to this topic
No replies to this topic

#1 iceman11

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 27 April 2008 - 08:39 AM

OK, I really need help here. I am creating a flash file with 6 steps of instruction with buttons such as "next" and "previous" in it to move along the steps. After designing my layout and doing my actionscript3, I click "test movie". and then i receive the error #1009: cannot access a property or method of a null object reference. But the thing is that, I am able to click the first button on my screen and move to the next step, after that my button don't work anymore. Hope you guys would understand this.

Here are my actionscript:

stop();
startBtn.addEventListener(MouseEvent.CLICK, clickHandler1);
nextBtn1.addEventListener(MouseEvent.CLICK, clickHandler2);
previousBtn2.addEventListener(MouseEvent.CLICK, clickHandler3);
nextBtn2.addEventListener(MouseEvent.CLICK, clickHandler4);
previousBtn3.addEventListener(MouseEvent.CLICK, clickHandler5);
nextBtn3.addEventListener(MouseEvent.CLICK, clickHandler6);
previousBtn4.addEventListener(MouseEvent.CLICK, clickHandler7);
nextBtn4.addEventListener(MouseEvent.CLICK, clickHandler8);
previousBtn5.addEventListener(MouseEvent.CLICK, clickHandler9);
nextBtn5.addEventListener(MouseEvent.CLICK, clickHandler10);
previousBtn6.addEventListener(MouseEvent.CLICK, clickHandler11);

function clickHandler1(event:MouseEvent):void{
gotoAndStop(5);
}
function clickHandler2(event:MouseEvent):void{
gotoAndStop(12);
}
function clickHandler3(event:MouseEvent):void{
gotoAndStop(5);
}
function clickHandler4(event:MouseEvent):void{
gotoAndStop(19);
}
function clickHandler5(event:MouseEvent):void{
gotoAndStop(12);
}
function clickHandler6(event:MouseEvent):void{
gotoAndStop(25);
}
function clickHandler7(event:MouseEvent):void{
gotoAndStop(19);
}
function clickHandler8(event:MouseEvent):void{
gotoAndStop(31);
}
function clickHandler9(event:MouseEvent):void{
gotoAndStop(25);
}
function clickHandler10(event:MouseEvent):void{
gotoAndStop(37);
}
function clickHandler11(event:MouseEvent):void{
gotoAndStop(31);
}

Please help and thanks a lot.

Edited by iceman11, 27 April 2008 - 08:44 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users