# Stop button code throws an error!

**URL:** <https://forum.kirupa.com/t/stop-button-code-throws-an-error/332051>\
**Category:** Uncategorized\
**Created:** [January 10, 2014, 8:39am UTC](https://forum.kirupa.com/t/stop-button-code-throws-an-error/332051 "2014-01-10T08:39:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learner\_7n](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@learner\_7n](https://forum.kirupa.com/u/learner_7n)\
**Post date:** [January 10, 2014, 8:39am UTC](https://forum.kirupa.com/t/stop-button-code-throws-an-error/332051/1 "2014-01-10T08:39:08Z")

</div>

Hi,

I need to view a movie which is linked in the SWF file using the following option:  
“Load external video with playback component”

I have created 3 buttons manually, “Play” “Pause” & “Stop” and written the following code:

```auto
BtnPlay.addEventListener(MouseEvent.CLICK,PlayClickHandler);
function PlayClickHandler(event:MouseEvent):void {
VideoBox.MPlayer.play()	;}

BtnPause.addEventListener(MouseEvent.CLICK,PauseClickHandler);
function PauseClickHandler(event:MouseEvent):void {
VideoBox.MPlayer.stop()	;}

BtnStop.addEventListener(MouseEvent.CLICK,StopClickHandler);
function StopClickHandler(event:MouseEvent):void {
VideoBox.MPlayer.gotoAndStop(0)	;}

```

The code for “Stop” button throws the following error:

**ReferenceError: Error #1069: Property gotoAndStop not found on fl.video.FLVPlayback and there is no default value.**  
\*\* at Video\_fla::VFrame\_2/StopClickHandler()

\*\*How to resolve this issue?
