Quiz app + singleton classes as3
===

I been working on a quiz app in As3 and I've found some issues during this.


Basically the structure of the quiz is:

- Main Class.as  ( all the instances are created there )
  - intMenu.as  (  instance of the menu )
  - initGame.as  ( instance of the grid of option to be chosen )
  - askQuestion.as (  instance of the question and answers to be chosen )



It's not possible to copy the whole code here because It's too much but I'll try:


the normal flow of the quiz is this:

1 > initMenu ( new unique instance is created and added to the Main instance )
    StartGame option is available
2 > the user clicks on the StartGame option and a new unique instance of the object ( initGame  ) is created with the grid of options ( 6x6 ) available. 

3 > IF the user clicks on each option: a new unique instance of the askQuestion object is created ( a textfield with the recovered question is shown, 3 radiobuttons to select the any of these options, a textfield to display the result and a button to run the validation:


    public static function getInstance():crearPregunta 	{
			
	if (_instance == null)	{
				
		_instance = new crearPregunta();
				
	}
			
	return _instance;
    }

    // the following function is created because I configured a timer to be executed after the answer selection

    private function closeTimer(t:TimerEvent)	{

	
	delete(Main.Instancia.getChildAt(2)); // go to and delete the object in the 2nd depth
	Main.Instancia.removeChildAt(2);
			
		
	}

There is something wrong here because I verify that the askQuestion.as instance is removed from the main instance but when I create again a new instance of the askQuestion.as, the radiobuttons remains with the last option chosen 

