Catch variable outside MC

Hi

I have a problem. Easy to do in AS2 but I can’t do in AS3.

I have a variable called:

var pageNumber:Number = 2;

the variable was created in the main timeline

And I have 2 MC, one inside the other, animation_mc and content_mc, the content is inside animation.

Inside the animation_mc I wrote in the timeline:

contentMc.gotoAndStop(pagenumber);

it gives an error. flash can’t find the variable pageNumber.

how can I do this?

thanks