mathus the seconth -> RE: Flash Q&A thread 2 ** checked everyday (4/21/2006 18:22:28)
|
i made a cool movie with PURE actionscript. put this on the first frame: this.createEmptyMovieClip("line", 1);
this.createEmptyMovieClip("box1", 2);
this.createEmptyMovieClip("box2", 3);
box1.lineStyle(1, 0x00000);
box1.beginFill(0xFF0000);
box1.moveTo(0, 0);
box1.lineTo(0, 20);
box1.lineTo(20, 20);
box1.lineTo(20, 0);
box1.moveTo(0, 0);
box1._x = 100;
box1._y = 200;
box1.onPress = function() {
this.startDrag();
};
box1.onRelease = box1.onReleaseOutside=function () {
this.stopDrag();
};
box2.lineStyle(1, 0x00000);
box2.beginFill(0x0099FF);
box2.moveTo(0, 0);
box2.lineTo(0, 20);
box2.lineTo(20, 20);
box2.lineTo(20, 0);
box2.moveTo(0, 0);
box2._x = 400;
box2._y = 200;
box2.onPress = function() {
this.startDrag();
};
box2.onRelease = box2.onReleaseOutside=function () {
this.stopDrag();
};
this.onMouseMove = function() {
line.clear();
line.lineStyle(1, 0x000000);
line.moveTo(box1._x+10, box1._y+10);
line.lineTo(box2._x+10, box2._y+10);
updateAfterEvent();
}; test your movie and then drag and drop the boxes!!! fun, fun, fun!!!
|
|
|
|