A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: 1099 Error that makes no sense

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    373

    1099 Error that makes no sense

    I've got two buttons on my stage. One with the instance name 'logo' and once with the instance name 'watch'. The AS3 code is very simple and accurate. Or so I thought:
    --
    logo.addEventListener(MouseEvent.MOUSE_DOWN, homelink);
    function homelink(evt:MouseEvent):void {
    gotoAndStop("home");
    }
    watch.addEventListener(MouseEvent.MOUSE_DOWN, watchlink);
    function watchlink(evt:MouseEvent):void {
    gotoAndStop("watch");
    }
    --
    Really simple, right? Not so fast. I test my movie and get the following error:
    --
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at main_fla::MainTimeline/frame2()
    at flash.display::MovieClip/gotoAndStop()
    at main_fla::MainTimeline/PL_LOADING()
    --
    Where did that come from? That's where I'm confused. What is PL_LOADING()? The keyframe is setup properly so none of this makes any sense. At least not to me. So where is this 1009 error coming from and how can I correct it?
    Adam Bell
    dzign@datatv.com
    --
    Over 90% of all websites
    suck......
    Join the minority.

  2. #2
    Junior Member
    Join Date
    Jul 2010
    Posts
    1

    Did you find a solution

    Hi Adam- Did you ever find a solution to this issue. I am suffering from the exact same thing/exact error message.

    Thanks

  3. #3
    Member
    Join Date
    Feb 2006
    Location
    San Francisco, CA
    Posts
    65
    Quote Originally Posted by Lumablue View Post
    Hi Adam- Did you ever find a solution to this issue. I am suffering from the exact same thing/exact error message.

    Thanks
    If I'm not mistaken, the problem in the original post has to do with the lack of an object reference in the event handler. For instance:

    Code:
    watch.addEventListener(MouseEvent.MOUSE_DOWN, watchlink);
    
    function watchlink(evt:MouseEvent):void {
           whichMovieClip.gotoAndStop("watch");
    }
    instead of

    Code:
    watch.addEventListener(MouseEvent.MOUSE_DOWN, watchlink);
    
    function watchlink(evt:MouseEvent):void {
           gotoAndStop("watch");
    }
    Last edited by TheDevilRidesIn; 07-24-2010 at 02:32 PM.
    "If, he thought to himself, such a machine is a virtual impossibility, then it must logically be a finite improbability."

Tags for this Thread

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