Dennis_gull
05-31-2008, 12:24 PM
I know I've posted a lot the last days but i almost done with my application and I think this is one of the last problems.
I store dynamically added movieClips inside an array so I later can control them like this:
for each(var m:MovieClip in dlistObject) {
// Do something with m
}
But now I want to be able to remove all the MovieClips but It doesnt work, I've tried to do the classic DOM example:
while(myInstance.firstChild) {
myInstance.removeChild(myInstance.firstChild);
}
but firstChild doesn't work with movieClips (at least not for me).
and I've also tried:
for each(var m:MovieClip in dlistObject) {
myInstance.removeChild(m);
}
but that will give me an error.
So how should I go on now? :confused:
PS:
Im also looking for a way to remove all values inside an Array if thats possible?
I store dynamically added movieClips inside an array so I later can control them like this:
for each(var m:MovieClip in dlistObject) {
// Do something with m
}
But now I want to be able to remove all the MovieClips but It doesnt work, I've tried to do the classic DOM example:
while(myInstance.firstChild) {
myInstance.removeChild(myInstance.firstChild);
}
but firstChild doesn't work with movieClips (at least not for me).
and I've also tried:
for each(var m:MovieClip in dlistObject) {
myInstance.removeChild(m);
}
but that will give me an error.
So how should I go on now? :confused:
PS:
Im also looking for a way to remove all values inside an Array if thats possible?