# Deleting Shared objects?

**URL:** https://forum.kirupa.com/t/deleting-shared-objects/16140
**Category:** Uncategorized
**Created:** [March 21, 2003, 12:06pm UTC](https://forum.kirupa.com/t/deleting-shared-objects/16140 "2003-03-21T12:06:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Spongebob](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Spongebob](https://forum.kirupa.com/u/Spongebob)
#### Post date: [March 21, 2003, 12:06pm UTC](https://forum.kirupa.com/t/deleting-shared-objects/16140/1 "2003-03-21T12:06:30Z")

</div>

Hi there!  
I’d like to know if there’s any way to delete a shared object from the HDD through AS or to set all of its properties to null or undefined. The documentation says: “If null or undefined is assigned to an attribute, Macromedia Flash MX deletes the attribute.”, but this is for an attribute. I’d like to delete the shared object itself and be able to create a new one…

I’ve tried: MyObject.data.MyVariable = null; and when I trace the attribute’s value later in my movie, it still has the first value I entered for it !!. No deletion occurs!

Is there an easy way to do so ?

```
 Thanks in advance,
             Spongebob
```

---

<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: [March 21, 2003, 2:05pm UTC](https://forum.kirupa.com/t/deleting-shared-objects/16140/2 "2003-03-21T14:05:27Z")

</div>

Howdy…

I haven’t tried it… But I THINK you cannot delete the Shared Object because of the security reasons… Why not reset everything in the Shared Object to null??? I think this should be almost the same thing as deleting one… 😉 Just a thought…

---

<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: [March 21, 2003, 6:55pm UTC](https://forum.kirupa.com/t/deleting-shared-objects/16140/3 "2003-03-21T18:55:56Z")

</div>

Yes! That’s what I thought and I did it… but when I trace one of the attribute’s value (previously deleted) later in the movie it has a value! and it should read undefined!

Anyone knows why ??  
Thank you very much!  
Regards,  
Spongebob

---

<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: [March 22, 2003, 8:10am UTC](https://forum.kirupa.com/t/deleting-shared-objects/16140/4 "2003-03-22T08:10:12Z")

</div>

Well… I don’t remember there were issues with deleting in the Shared Object… Not much I can do with given information… So, I guess you will have to check your code again… Show us what you have if you want… 😉

---

<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: [March 22, 2003, 8:53am UTC](https://forum.kirupa.com/t/deleting-shared-objects/16140/5 "2003-03-22T08:53:37Z")

</div>

according to this tech note, you can delete shared objects, but im not sure what the script looks like

[http://www.macromedia.com/support/flash/action\_scripts/local\_shared\_object/index.html](http://www.macromedia.com/support/flash/action_scripts/local_shared_object/index.html)

cheers
