15 Replies Latest reply on Mar 31, 2009 6:47 AM by XTorcha

    Error #1009: Cannot access a property or method of a null object reference

    XTorcha
      Hello,

      I have created a navigation bar in Flash which has a bunch of AS3 code that commands a movieclip to follow the mouse. The swf works fine on its own, and debugs nothing in Flash. When I attach the swf in Flex using either Image or SWFLoader, I get the following error when I load the page:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at TB2009_nav_fla::MainTimeline/doThis()[TB2009_nav_fla.MainTimeline::frame1:17]
      at TB2009_nav_fla::MainTimeline/frame1()[TB2009_nav_fla.MainTimeline::frame1:63]

      The weird thing is, if I refresh the page a few times, I don't always get the error. Sometimes the file displays correctly! Any help with this would be appreciated. I'm new to AS3 so please be specific.

      Thanks in advance