I am loading various swf library component/classes during run time.
All of these components have the function ‘remove()’ in them.
Not all of these components are MovieClips, many extend Sprite instead.
I have them in an array that I loop through and call remove() on each of them.
I would like to keep strict mode on if at all possible:
Usually I can just do this
for(i=0;i<a.length;i++)
{
MovieClip(i).remove();
}
but I am wondering what happens if I type a class that extends Sprite as a MovieClip to avoid the compile time error in order to call the remove function on it?
remove() does things like remove all listeners, stop sounds playing etc and finally parent.removeChild(this);
Thank you for taking the time to look at my problem. I am really just after opinions on this one.