f your setmask(mask) fails make sure the movieclip you are masking is not too long or the set masking will fail, even if you set cacheAsBitmap = true.