The following codes don't work fullscreen mode ...

function isContained2(p_clip1:MovieClip, p_clip2:MovieClip, p_alphaTolerance:Number):Boolean
{
// adapted from
//http:gskinner.com/blog/archives/2005/10/source_code_sha.html
// note: clip1 must be able to fit inside clip2
// set up default params:
if (p_alphaTolerance == undefined)
{
p_alphaTolerance = 255;
}
// get bounds:
var bounds1:Object = p_clip1.getBounds(_root);
var bounds2:Object = p_clip2.getBounds(_root);
// rule out anything that we know can't collide:
if (((bounds1.xMax < bounds2.xMin) || (bounds2.xMax < bounds1.xMin))
|| ((bounds1.yMax < bounds2.yMin) || (bounds2.yMax < bounds1.yMin))) {
return false;
}
// determine test area boundaries:
var bounds:Object = {};
bounds.xMin = Math.max(bounds1.xMin, bounds2.xMin);
bounds.xMax = Math.min(bounds1.xMax, bounds2.xMax);
bounds.yMin = Math.max(bounds1.yMin, bounds2.yMin);
bounds.yMax = Math.min(bounds1.yMax, bounds2.yMax);

// set up the image to use:
var img:BitmapData = new BitmapData(bounds.xMax - bounds.xMin, bounds.yMax - bounds.yMin, false);
// draw in the first image:
var mat:Matrix = p_clip1.transform.concatenatedMatrix;
mat.tx -= bounds.xMin;
mat.ty -= bounds.yMin;
img.draw(p_clip1,mat,new ColorTransform(1, 1, 1, 1, 255, -255, -255, p_alphaTolerance));
// overlay the second image:
mat = p_clip2.transform.concatenatedMatrix;
mat.tx -= bounds.xMin;
mat.ty -= bounds.yMin;
img.draw(p_clip2,mat,new ColorTransform(1, 1, 1, 1, 255, 255, 255, p_alphaTolerance),"difference");
// find the intersection:
var intersection:Rectangle = img.getColorBoundsRect(0x00FFFFFF, 0x00FF0000, true);
// if there is no intersection, return true:
if (intersection.width == 0)
{
return true;
}
else
{
return false;
}
}