Boundaries

is there any easy way to make boundaries for the eadg of the stage? instead of making 4 separate MC’s. I can use the width and hieght variables of the stage to do it but it would still require 4 bits of code. So just wondering if anyone knows a way?