# Clear object

**URL:** <https://forum.kirupa.com/t/clear-object/7742>\
**Category:** Uncategorized\
**Created:** [November 6, 2002, 8:02pm UTC](https://forum.kirupa.com/t/clear-object/7742 "2002-11-06T20:02:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [November 6, 2002, 8:02pm UTC](https://forum.kirupa.com/t/clear-object/7742/1 "2002-11-06T20:02:56Z")

</div>

I make a sound object

mSound = new Sound();

How can I clear mSound as in earasing whatever is in it?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 6, 2002, 9:56pm UTC](https://forum.kirupa.com/t/clear-object/7742/2 "2002-11-06T21:56:22Z")

</div>

Don think you can unload sound

from tute:

mySound = new Sound();  
mySound.loadSound(“music.mp3”,true);

you can stop the sound:

mySound.stop()

but rather than unloading you just reload another one in

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 6, 2002, 10:05pm UTC](https://forum.kirupa.com/t/clear-object/7742/3 "2002-11-06T22:05:46Z")

</div>

The sounds object can either be used globally or through a movie clip:

**Global:** [FONT=courier new][color=blue]new Sound/color;[/FONT]

**Movie Clip:** [FONT=courier new][color=blue]new Sound/color;[/FONT]

If you load the sound into a movie clip just unload the movie clip!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 6, 2002, 10:10pm UTC](https://forum.kirupa.com/t/clear-object/7742/4 "2002-11-06T22:10:41Z")

</div>

Thank you:)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 11, 2002, 12:48am UTC](https://forum.kirupa.com/t/clear-object/7742/5 "2002-11-11T00:48:29Z")

</div>

This is my new set up.

screen = new Sound(sclip);

One button that has

on (release) {  
screen.loadSound(“burnout.mp3”, true);  
}

2nd button

on (release) {  
unloadMovie(sclip);  
}

I hit the 1st button and the song starts, then I hit the 2nd button and the sound does not stop. Should the sound stop or what is going wrong?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 11, 2002, 1:17am UTC](https://forum.kirupa.com/t/clear-object/7742/6 "2002-11-11T01:17:57Z")

</div>

If you want to get rid of the object (or not use it anymore),  
I would:

```auto

1st button

on(release){

//create your obj

mysound=new Sound();
mysound.loadsound("mysong.mp3",true);
}

2nd button

on(release){

mysound.stop();
mysound=new Sound();
}

//it is a poor man's unloader.

```

What I dont understand is, if it’s streaming, this is the same as just saying stop playing, because the Sound object still exists, it just wont respond to mysound.start();
