How do u write getBounds properly i cant find any thing on here or google that can explain it and how to use it properly.
Were is good tutorial on it, or a thread that disscusses how it works??
Printable View
How do u write getBounds properly i cant find any thing on here or google that can explain it and how to use it properly.
Were is good tutorial on it, or a thread that disscusses how it works??
It returns the min and max x and y values in an object in whatever coordinate space you want ...
Code:// gives its min and max coordintes in the movieClip that mc is placed
var mcBounds = mc.getBounds(this);
trace("xMin in the coordinate space of 'this' = "+mcBounds.xMin);
trace("yMin in the coordinate space of 'this' = "+mcBounds.yMin);
trace("xMax in the coordinate space of 'this' = "+mcBounds.xMax);
trace("yMax in the coordinate space of 'this' = "+mcBounds.yMax);
// gives its min and max coordintes inside mc
var mcBounds = mc.getBounds(mc);
trace("xMin in the coordinate space of 'mc' = "+mcBounds.xMin);
trace("yMin in the coordinate space of 'mc' = "+mcBounds.yMin);
trace("xMax in the coordinate space of 'mc' = "+mcBounds.xMax);
trace("yMax in the coordinate space of 'mc' = "+mcBounds.yMax);