# Progressbar + loadsound + reset?

**URL:** https://forum.kirupa.com/t/progressbar-loadsound-reset/189402
**Category:** flash
**Created:** [June 2, 2006, 6:34am UTC](https://forum.kirupa.com/t/progressbar-loadsound-reset/189402 "2006-06-02T06:34:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Urme](https://avatars.discourse-cdn.com/v4/letter/u/f1d935/32.png) [@Urme](https://forum.kirupa.com/u/Urme)
#### Post date: [June 2, 2006, 6:34am UTC](https://forum.kirupa.com/t/progressbar-loadsound-reset/189402/1 "2006-06-02T06:34:03Z")

</div>

Hi,

I made a simple progressbar when you play a mp3 file.

```php

var my_sound:Sound = new Sound();

```

This is my play button:

```php

on(release)
{
_root.my_sound.stop();
_root.my_sound.loadSound("mysound.mp3", true); 
gotoAndStop("on");
}

```

When I push play it jumps to a frame called “on”, on that frame I have this code and a stop button:

```php

function soundStatus(){
duration = _root.my_sound.duration;
position = _root.my_sound.position;
_root.playhead._xscale = position / duration * 132 + 0.1; 
}
my_interval = setInterval(soundStatus, 100, my_sound);
_root.my_sound.onSoundComplete = function() {
gotoAndPlay("off");
}

```

This is the Stop button

```php

on(release)
{
_root.my_sound.stop();
gotoAndPlay("off");
}

```

But if I push the stop button in the middle of the song the progressbar doesn’t reset, and if I Play the song again, the song it self starts from the beginning but the progressbar continues where I stopped it the last time.

How can I reset the progressbar when I hit the stop button?  
I tried with position = 0; and stuff like that but nothing works.
