title: Flash CS5 Actionscript 3.0 Using a movie clip as a button with linking
body: <p>So I have an animated button in the form of a movie clip that I want to be able to use as a link. The movie clip is animated on mouse over and mouse off using a script I found online, and that works perfectly. However, when I try to create a simple actionscript command to also have the movie clip act as a link, I get the following error thrown at me:</p>
  
  <blockquote>
    <p>TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at PheV3_fla::MainTimeline/frame185()</p>
  </blockquote>
  
  <p>All of the tutorials I found online use the "button" type for linking as opposed to a movie clip, which seems to work fine, but I need this to be a movie clip for the animation. Here is the code I'm using:</p>
  
  <pre><code>import flash.events.MouseEvent
  import flash.net.URLRequest
  
  MixesButtonTop.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_2);
  
  function fl_ClickToGoToWebPage_2(event:MouseEvent):void
  {
      navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
  }
  </code></pre>
  
  <p>Do I need to reference one of the symbols inside the movie clip button itself or something? I'm very new to all this so if I missed anything please let me know, thanks so much for the help!</p>