I accidently marked my other post resolved so I reposted with only the necessary code to make it easier to read. This is all of the code regarding my problem. Basically my second if statement inside the pwrbtn function isnt working. The lines

MovieClip(parent).pwrframe();
pwrcomp=true;
trace(pwrcomp);

are still running even though the boolean condition of the statement is set to true. Below is the code that is involved. Anyone who can take a second to look at this I would be greatly appreciated. I have stared at this for hours and haven't found the error.

Movie Clip

var pwrcomp:Boolean = false;

inv_power_btn.addEventListener(MouseEvent.CLICK,pw rbtn);

function pwrbtn(event:Event)
{
if(pwr == false)
{
gotoAndStop(2);
pwr=true;

if(pwrcomp == false)
{
MovieClip(parent).pwrframe();
pwrcomp=true;
trace(pwrcomp);
}

}

else
{
gotoAndStop(1);
pwr=false;
}
}


Timeline

function pwrframe()
{
gotoAndStop("signalframe");
trace("frame2");

}