# Why doesn't this work? Simple script

**URL:** <https://forum.kirupa.com/t/why-doesnt-this-work-simple-script/272369>\
**Category:** Uncategorized\
**Created:** [October 4, 2008, 4:57pm UTC](https://forum.kirupa.com/t/why-doesnt-this-work-simple-script/272369 "2008-10-04T16:57:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![youwhat](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@youwhat](https://forum.kirupa.com/u/youwhat)\
**Post date:** [October 4, 2008, 4:57pm UTC](https://forum.kirupa.com/t/why-doesnt-this-work-simple-script/272369/1 "2008-10-04T16:57:21Z")

</div>

The following code is to make the movie stop/start when i click ‘btn1’.

btn1.addEventListener(MouseEvent.CLICK, clicked)

function clicked (event:Event)

{  
var stopped:int  
trace(stopped)  
if(stopped==0)

```
{
	stopped=1
	this.stop()
}
	
else

{
	stopped=0
	this.play()
}

```

}

The movie stops when i click it, but never resumes. Also the trace always shows ‘stopped’ as 0. Any help would be appreciated.
