# Instances on stage (exported SWF) is undead in ActionScript?

**URL:** <https://forum.kirupa.com/t/instances-on-stage-exported-swf-is-undead-in-actionscript/287939>\
**Category:** Uncategorized\
**Created:** [May 8, 2009, 4:11am UTC](https://forum.kirupa.com/t/instances-on-stage-exported-swf-is-undead-in-actionscript/287939 "2009-05-08T04:11:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhangxiaorui](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zhangxiaorui](https://forum.kirupa.com/u/zhangxiaorui)\
**Post date:** [May 8, 2009, 4:11am UTC](https://forum.kirupa.com/t/instances-on-stage-exported-swf-is-undead-in-actionscript/287939/1 "2009-05-08T04:11:16Z")

</div>

Say I have an instance on the stage in Flash CS3 (assume a designer put it there) and give me the SWF.

Here is my problem:

```auto

// suppose the linkage name is "someMC" and 
// the instance name is specified as "instance"

// Get a MC from my library:
someMC = new SomeMC();
addChild(someMC);

// It's easy to use it with ActionScript code
someMC.instance.alpha = .5;

// Work, just clear the instance!
someMC.removeChild(someMC.instance);

// seems to be working.
delete someMC.instance; 

// Will print null - seems everything is okay.
trace(someMC.instance) 

// -> ERROR here! saying something that I 
// cannot change the variable type of "someMC.instance"
// - while I have already deleted it already, WHY?
someMC.instance = new SimpleButton(); 

```
