# as3 Movieclip not going to selected frame: error

**URL:** <https://forum.kirupa.com/t/as3-movieclip-not-going-to-selected-frame-error/318789>\
**Category:** flash\
**Created:** [January 30, 2011, 6:17pm UTC](https://forum.kirupa.com/t/as3-movieclip-not-going-to-selected-frame-error/318789 "2011-01-30T18:17:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![samiflashflash](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@samiflashflash](https://forum.kirupa.com/u/samiflashflash)\
**Post date:** [January 30, 2011, 6:17pm UTC](https://forum.kirupa.com/t/as3-movieclip-not-going-to-selected-frame-error/318789/1 "2011-01-30T18:17:01Z")

</div>

So in my game I have a ketchup button that when its click creats a ketchup movieclip that attaches to the cursor. What I want is for when you click on the buns with the ketchup cursor it goes to the frame within the bunsmc called “ketchup”.

I keep getting this error and I have no idea how to fix it!  
TypeError: Error #1034: Type Coercion failed: cannot convert ketchmc$ to flash.display.DisplayObject.  
at bunsmc/ketchup()

```auto
package
{
 import flash.display.MovieClip;
 import flash.events.MouseEvent;
 
 
 public class bunsmc extends MovieClip
 {
  public function bunsmc() 
  {
   x = 267;
   y = 235;
   
   addEventListener(MouseEvent.MOUSE_OVER,hilight);
  }
  public function hilight (e:MouseEvent):void
  {
   gotoAndPlay("highlight");
   
   addEventListener(MouseEvent.MOUSE_OUT,plain);
  }
  public function plain (e:MouseEvent):void
  {
   gotoAndPlay("plain");
   
   var blnTrip2:Boolean = true;
   addEventListener(MouseEvent.CLICK,ketchup);
  }
  var ketchMC = ketchmc;
     function ketchup (e:MouseEvent):void
  {
   
   if(stage.contains(ketchMC)&& blnTrip2)
   {
    trace("yay");
    stage.removeEventListener(MouseEvent.CLICK,ketchup);
    blnTrip = false;
    
    
    
   }
  }
 }
}

```

what am I doing worng?  
and suggestions on how to fix this and make it work??
