A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [CS3] TypeError: Error #1009: Cannot access a property or method of a null object ref

  1. #1
    Junior Member
    Join Date
    Dec 2008
    Posts
    1

    Unhappy [CS3] TypeError: Error #1009: Cannot access a property or method of a null object ref

    Yes, I realize this probably a common error, I am a student and have no clue on how to solve this. i am doing (what I think to be) simple navigation buttons and this error keeps popping up everytime I try to ctrl+enter the movie...

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at applepic2_fla::MainTimeline/frame1()

    Here is my actionscript 3.0

    stop();
    applebtn.addEventListener(MouseEvent.CLICK, onAppleClick, false, 0, true);
    mcbtn.addEventListener(MouseEvent.CLICK, onMCClick, false, 0, true);
    rugbybtn.addEventListener(MouseEvent.CLICK, onRugbyClick, false, 0, true);
    aopibtn.addEventListener(MouseEvent.CLICK, onAopiClick, false, 0, true);
    psebtn.addEventListener(MouseEvent.CLICK, onPSEClick, false, 0, true);
    rugbymain.addEventListener(MouseEvent.CLICK, onRugbymainClick, false, 0, true);
    applemain.addEventListener(MouseEvent.CLICK, onApplemainClick, false, 0, true);
    aopimain.addEventListener(MouseEvent.CLICK, onAopimainClick, false, 0, true);
    psemain.addEventListener(MouseEvent.CLICK, onPSEmainClick, false, 0, true);
    mcbtn.addEventListener(MouseEvent.CLICK, onMCmainClick, false, 0, true);

    function onAppleClick(evt:MouseEvent):void {
    gotoAndPlay(2);
    }
    function onRugbyClick(evt:MouseEvent):void {
    gotoAndPlay(51);
    }
    function onAopiClick(evt:MouseEvent):void {
    gotoAndPlay(98);
    }
    function onPSEClick(evt:MouseEvent):void {
    gotoAndPlay(143);
    }
    function onMCClick(evt:MouseEvent):void {
    gotoAndPlay(190);
    }
    function onRugbymainClick(evt:MouseEvent):void {
    gotoAndPlay(73);
    }
    function onApplemainClick(evt:MouseEvent):void {
    gotoAndPlay(26);
    }
    function onAopimainClick(evt:MouseEvent):void {
    gotoAndPlay(198);
    }
    function onPSEmainClick(evt:MouseEvent):void {
    gotoAndPlay(173);
    }
    function onMCmainClick(evt:MouseEvent):void {
    gotoAndPlay(213);
    }


    Any help you could give me would be very much appreciated (oh an put it in as simpliest form you can, I'm a newbie at this actionscript)

  2. #2
    Banned deepakflash's Avatar
    Join Date
    Aug 2007
    Location
    [Object not found]
    Posts
    1,160
    This should be in Actionscript 3.0 forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center