主题:  getBounds

瀚叔

职务:普通成员
等级:1
金币:1.0
发贴:256
#12002/8/31 7:49:43
getBounds这个语句是怎样用的,请教



5D荣誉版主

职务:普通成员
等级:2
金币:1.0
发贴:515
#22002/8/31 9:30:47
myMovieClip.getBounds(targetCoordinateSpace)
targetCoordinateSpace:参照坐标系统路径

返回:
xMin, xMax, yMin, and yMax
上下左右4点
----------------------------------------------------------------------
clipBounds = clip.getBounds(_root);
x_max = clipBounds.xMax;
y_max = clipBounds.yMax;
x_min = clipBounds.xMin;
y_min = clipBounds.yMin;

上面例子返回clip在_root下的上下左右4点

编辑历史:[这消息被mmommo编辑过(编辑时间2002-08-31 09:31:24)]