-
1. Re: Load external and give instance name
ssjskipp Jul 15, 2009 4:59 PM (in response to BrianatArena)Why do you need an instance name? You have a variable linking to the loader object. Just use that to reference the Loader.
In any case, the name property that is inherited by all display objects.
eventInitialLoader.name = "some instance name";
-
2. Re: Load external and give instance name
BrianatArena Jul 16, 2009 10:09 AM (in response to ssjskipp)That should work, I must have something interfering with it elsewhere in my code. Thanks
-
3. Re: Load external and give instance name
ssjskipp Jul 16, 2009 10:44 AM (in response to BrianatArena)At some point in your code you must have a reference to the instance you want to remove, then you can just do:
[instance].parent.removeChild([instance]);
or set up an array:
var instanceArr:Array = new Array();
and when you load a new instance with the Loader, do:
instanceArr.push(myInstance);
and to access them:
for (var i:uint = 0; i < myInstance; i++){
var child = instanceArr[i];
(do stuff with child)
child.parent.removeChild(child);
}

