Tracing frames in an animation

Hi I have a mc with a set of images with fadein fadeout animation. there are two sets namely SetA and SetB with there respective buttons buttonA and ButtonB. Now the mc has two labels corresponding the buttons, when the label is A it should reduce the alpha for ButtonA to 35and vice versa. But the main problem is while tracing the timeline the currentframe remains 1 and does not go any further, so it plays the animation but does not reach the labelB for ButtonB.

Is there any way we can trace the timeline keyframes in the mc?

Here is the sample code.

var currentlabel = “”;
function checkFrames() {
if (_root.currentlabel=“labelA”) {
_root.cert_icon._alpha = 35;
_root.awards_icon._alpha = 100;
trace(__root.currentlabel);
//trace(“Awards Full Alpha”);
} else if (_root.currentlabel=“labelB”) {
trace(__root.currentlabel);
_root.awards_icon._alpha = 35;
_root.cert_icon._alpha = 100;
//trace(“Certification Full Alpha”);
} else {
_root.award_icon._alpha = 100;
_root.cert_icon._alpha = 100;
trace(“Both Full Alpha”);
}
}

currentlable comes from the mc in which variables are defined for the sets but are not working… Anyone?