那如果用你这个改成自动变化形状的应该怎么改?另外精度又在哪设置?
import com.ycccc.MovieClip.Skew;
var imageBoard:MovieClip = createEmptyMovieClip("imageBoard", dot0.getDepth()-4);
var skew:Skew = new Skew(imageBoard, "Image", 5, 5);
//精度越大效果越好,但不能太大会死机哦~,我这里设置了不能超过20
var w:Number = imageBoard._width;
var h:Number = imageBoard._height;
var sx:Number = 30;
var sy:Number = 30;
var interval:Number;
dotSet();
function dotSet() {
var p:Array = [[0, 0], [w, 0], [w, h], [0, h]];
for (var j = 0; j<4; j++) {
this["dot"+j]._x = sx+p[j][0];
this["dot"+j]._y = sy+p[j][1];
this["dot"+j].onPress = function() {
this.startDrag();
interval = setInterval(this._parent, "flush", 10);
};
this["dot"+j].onRelease = this["dot"+j].onReleaseOutside=function () {
this.stopDrag();
clearInterval(interval);
};
}
skew.setTransform(dot0._x, dot0._y, dot1._x, dot1._y, dot2._x, dot2._y, dot3._x, dot3._y);
}
function flush() {
updateAfterEvent();
skew.setTransform(dot0._x, dot0._y, dot1._x, dot1._y, dot2._x, dot2._y, dot3._x, dot3._y);
}