# TypeError: Error #1006:- how do I fix it?

**URL:** <https://forum.kirupa.com/t/typeerror-error-1006-how-do-i-fix-it/325893>\
**Category:** flash\
**Created:** [November 10, 2011, 12:35pm UTC](https://forum.kirupa.com/t/typeerror-error-1006-how-do-i-fix-it/325893 "2011-11-10T12:35:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adi\_fl](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@adi\_fl](https://forum.kirupa.com/u/adi_fl)\
**Post date:** [November 10, 2011, 12:35pm UTC](https://forum.kirupa.com/t/typeerror-error-1006-how-do-i-fix-it/325893/1 "2011-11-10T12:35:47Z")

</div>

i wrote this code:  
if (frog.visible &&frog2.hitTestObject(line\_mc))  
{  
frog2.visible = false;  
this.gotoAndPlay(3);  
}

and it does this error:  
TypeError: Error #1006: gotoAndStop is not a function.  
at Function/\<anonymous\>()

why is it does that and how do I fix it?
