title: Getting the error 1119: Access of possibly undefined property visible through a reference with static type Class
body: <p>I am attempting to hide a symbol (Grill image) as soon as my animation loads.
  Currently I am getting the error, E:\Burger Game\DragandDrop\Dragable.as, Line 4, Column 8  1119: Access of possibly undefined property visible through a reference with static type Class. As you can probably tell, I am new to flash.</p>
  
  <pre><code>package DragandDrop
  {
      Grill.visible=false;
      import flash.display.MovieClip;
      import flash.events.MouseEvent;
      import flash.geom.Point;
  
      public class Dragable extends MovieClip
      {
  
          protected var homePos:Point;
          var totalToBowl:int =3;
          var i:int = 0;
          public function Dragable ()
          {                   
              homePos=new Point( x, y);
              buttonMode =true;
              addEventListener ( MouseEvent.MOUSE_DOWN, move);
          }
  
          //egg functions
          protected function move(event:MouseEvent) :void
          {           
              parent.addChild(this);
              startDrag();
              stage.addEventListener(MouseEvent.MOUSE_UP, stageUp)            
          }
  
          //item drop function
  
          protected function stageUp(event:MouseEvent):void
                  {
  
                  stopDrag();
                  if (event.target.dropTarget != null &amp;&amp;dropTarget.parent.name == "Bowl")
                  {
                      scaleX=scaleY=0;
                      alpha=0.5;
                      y= stage.stageHeight-height -700;
                      x=stage.stageWidth-width- 1400;
                      buttonMode=false;
                      removeEventListener(MouseEvent.MOUSE_DOWN, stageUp)
                      i++
  
              }if (i == totalToBowl){
  
              i=10
              trace(i);
              event.target.dropTarget.visible = false;
  
  
          }
          if (i==10 )
          {
              dropTarget.parent.visible = false;  
                  }else{
                      returnToHome();
  
                  }
      }
  
          protected function returnToHome():void
          {
              x = homePos.x;
              y= homePos.y;
          }
  
  }
  </code></pre>
  
  <p>Any idea why I am getting this error?</p>
  
  <p>Any help would be massively appreciated.
  Many thanks,</p>
  
  <p>Rob</p>