# Problem with Movie Clip controlling per AS

**URL:** https://forum.kirupa.com/t/problem-with-movie-clip-controlling-per-as/270200
**Category:** flash
**Created:** [September 6, 2008, 1:26pm UTC](https://forum.kirupa.com/t/problem-with-movie-clip-controlling-per-as/270200 "2008-09-06T13:26:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![KatsuragiMyamo](https://avatars.discourse-cdn.com/v4/letter/k/b2d939/32.png) [@KatsuragiMyamo](https://forum.kirupa.com/u/KatsuragiMyamo)
#### Post date: [September 6, 2008, 1:26pm UTC](https://forum.kirupa.com/t/problem-with-movie-clip-controlling-per-as/270200/1 "2008-09-06T13:26:57Z")

</div>

Hello,  
i want to play a Movie Clip by pressing a seperate Button. At the end o th Clip it should stop. This is the Code that i´m using:

profil.stop();

profil.open.onRelease=function () {  
profil.play();  
}

At Frame 20 (the end of the Movie Clip):

profil.stop();

The whole code is placed in a seperate layer above the layer with  
the Movie Clip. It works to a certain point, but not correctly. Instead  
of stoping the Movie Clip at it end, it´s stoping at random.

Is it possible to upload the Fla for your better understanding?

Thank you  
Myamo
