Forgive me I'm tired and embaressed that I can't figure this out...
So the first time this code is executed (ie the Next button is pressed), it works just fine. The second time this function is executed though, the question_mc does not get removed.
Code:
function nextQuestion(){
delete visQuestion;
_level0.question_mc.swapDepths(999);
_level0.question_mc.removeMovieClip();
if(_level0.question_mc){
trace('still here');
for(a in _level0.question_mc){
trace("question number:"+currentQuestion+" value:"+_level0.question_mc[a]+" type of:"+typeof _level0.question_mc[a]+" with name:"+_level0.question_mc[a]._name);
}
trace('end objects');
} else {
trace('removed');
}...
visQuestion is the object created by a class that creates the question_mc on the stage. So the first time around the trace is just "removed". The second time around the trace returns:
The option_mc# clips are from the previous question_mc that should have been removed. The number returned, without a name, I have no idea where it's coming from. The question_mc is being created on the stage by a class, like this:
Code:
class QuestionLayout{
public function QuestionLayout(myQuestion,currentQuestion){
var question_mc:MovieClip = _level0.createEmptyMovieClip("question_mc", _level0.getNextHighestDepth());
I'm hoping maybe someone has an idea what might typically cause something like this to happen? I'd give you the whole code, but I wouldn't expect anyone to surf through 600 lines.