AS3: detecting when user has clicked on all necessary buttons

Hallo all,
I have been working on a UI for the past while. Now I need to add a functionality that detects when a user has accessed all the necessary buttons. When this has been a detected a final movie clip will play. I scripted a basic example of what needs to happen.


stop();


var btn1clicked:Boolean = false;
var btn2clicked:Boolean = false;
var btn3clicked:Boolean = false;
var btn4clicked:Boolean = false;
var btn5clicked:Boolean = false;


mc_xx.visible = false;
hideInactive();
showButtons();


function hideInactive()
{
	mc_greenInactive.visible = false;
	mc_redInactive.visible = false;
	mc_purpleInactive.visible = false;
	mc_blueInactive.visible = false;
	mc_yellowInactive.visible = false;
}


function showButtons()
{
	btn_green.visible = true;
	btn_red.visible = true;
	btn_purple.visible = true;
	btn_blue.visible = true;
	btn_yellow.visible = true;
}


btn_green.addEventListener(MouseEvent.CLICK, greenButton);
function greenButton(event:MouseEvent):void
{
		mc_greenInactive.visible = true;
		btn_green.visible = false;
		btn1clicked = true;
}


btn_red.addEventListener(MouseEvent.CLICK, redButton);
function redButton(event:MouseEvent):void
{
		mc_redInactive.visible = true;
		btn_red.visible = false;
		btn2clicked = true;
}


btn_purple.addEventListener(MouseEvent.CLICK, purpleButton);
function purpleButton(event:MouseEvent):void
{
		mc_purpleInactive.visible = true;
		btn_purple.visible = false;
		btn3clicked = true;
}


btn_blue.addEventListener(MouseEvent.CLICK, blueButton);
function blueButton(event:MouseEvent):void
{
		mc_blueInactive.visible = true;
		btn_blue.visible = false;
		btn4clicked = true;
}


btn_yellow.addEventListener(MouseEvent.CLICK, yellowButton);
function yellowButton(event:MouseEvent):void
{
		mc_yellowInactive.visible = true;
		btn_yellow.visible = false;
		btn5clicked = true;
}


function checkButtons():void
	{
		if(btn1clicked && btn2clicked && btn3clicked && btn4clicked && btn5clicked)
		{
		mc_xx.visible = true;
		mc_xx.play();
		}
	}

I am VERY new to action scripting, so please excuse if I haven’t used correct practice.
I hope somebody can help me with this or just direct me into the right direction…