Publish with percentage dimensions ruins my masks

Hello, i need heal to create a mask with as3.
I dray a rectangle in the right place.
But when i add the code to transform that rectangle in a mask the rectangle doesn’t keep it’s size, wich means that the mask doesn’t get the size i wanted.
Any ideias?